fix potential crash

This commit is contained in:
Phillip Thelen 2017-03-01 16:21:01 +01:00
parent 165d141060
commit 688f2035a6

View file

@ -50,7 +50,10 @@ public class SubscriptionPlan extends BaseModel {
public boolean isActive() {
Date today = new Date();
return planId != null && this.dateTerminated == null || this.dateTerminated.after(today);
if (this.dateTerminated == null) {
return true;
}
return planId != null || this.dateTerminated.after(today);
}
@Override