Skip to content

Commit

Permalink
fix(inventory): fix anonymous inventory
Browse files Browse the repository at this point in the history
Signed-off-by: Teclib <skita@teclib.com>
  • Loading branch information
stonebuzz committed Dec 13, 2019
1 parent 0ebd9be commit e392f1f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ public void toXMLWithoutPrivateData(XmlSerializer serializer) {
serializer.startTag(null, mType);

for (Map.Entry<String, CategoryValue> entry : this.entrySet()) {
if(!this.get(entry.getKey()).isPrivate()) {
if(this.get(entry.getKey()).isPrivate() != null
&& !this.get(entry.getKey()).isPrivate()) {
setXMLValues(serializer, entry);
}
}
Expand Down Expand Up @@ -240,7 +241,8 @@ public JSONObject toJSONWithoutPrivateData() {
try {
JSONObject jsonCategories = new JSONObject();
for (Map.Entry<String,CategoryValue> entry : this.entrySet()) {
if(!this.get(entry.getKey()).isPrivate()) {
if(this.get(entry.getKey()).isPrivate() != null
&& !this.get(entry.getKey()).isPrivate()) {
setJSONValues(jsonCategories, entry);
}
}
Expand Down

0 comments on commit e392f1f

Please # to comment.