From a6e490dbe5473a1cf7c7e5f94422b4b1be29f306 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 1 Jul 2024 19:40:16 +0100 Subject: [PATCH] fix npe --- src/main/java/cc/fascinated/bat/premium/PremiumProfile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java b/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java index 2c1f5ba..cb63d13 100644 --- a/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java +++ b/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java @@ -121,7 +121,7 @@ public class PremiumProfile extends Serializable { Document document = new Document(); document.put("activatedAt", this.activatedAt); document.put("expiresAt", this.expiresAt); - document.put("type", this.type.name()); + document.put("type", this.type != null ? this.type.name() : null); return document; }