fix npe
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 44s

This commit is contained in:
Lee 2024-07-06 00:00:53 +01:00
parent 8cc465e53d
commit 35b8fff808

View File

@ -113,7 +113,7 @@ public class PremiumProfile extends Serializable {
public void load(Document document, Gson gson) {
this.activatedAt = (Date) document.getOrDefault("activatedAt", new Date());
this.expiresAt = (Date) document.getOrDefault("expiresAt", null);
this.type = document.containsKey("type") ? Type.valueOf(document.getString("type")) : null;
this.type = document.getString("type") != null ? Type.valueOf(document.getString("type")) : null;
}
@Override