Skip to content

Commit

Permalink
Add a check for was_sustainer property to be an int. (#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
roundhill authored Apr 10, 2024
1 parent cbb3010 commit c6f47e0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ public boolean getWasSustainer() {
return false;
}

return (Boolean)getProperty(WAS_SUSTAINER_KEY);
if (wasSustainer instanceof Boolean) {
return (Boolean) wasSustainer;
} else {
return wasSustainer instanceof Integer && ((Integer) wasSustainer) > 0;
}
}

public static class Schema extends BucketSchema<Preferences> {
Expand Down

0 comments on commit c6f47e0

Please sign in to comment.