forked from Fascinated/Bat
fix for npe??
This commit is contained in:
parent
3082265ec6
commit
c6289d1c8e
@ -113,6 +113,7 @@ public class BatGuild extends ProfileHolder {
|
||||
* Saves the user
|
||||
*/
|
||||
public void save() {
|
||||
org.bson.Document document = new org.bson.Document();
|
||||
document.put("_id", id);
|
||||
document.put("createdAt", createdAt);
|
||||
|
||||
@ -124,7 +125,7 @@ public class BatGuild extends ProfileHolder {
|
||||
|
||||
MongoService.INSTANCE.getGuildsCollection().replaceOne(
|
||||
new org.bson.Document("_id", id),
|
||||
this.getDocument(),
|
||||
document,
|
||||
new ReplaceOptions().upsert(true)
|
||||
);
|
||||
}
|
||||
|
@ -103,6 +103,7 @@ public class BatUser extends ProfileHolder {
|
||||
* Saves the user
|
||||
*/
|
||||
public void save() {
|
||||
org.bson.Document document = new org.bson.Document();
|
||||
document.put("_id", id);
|
||||
document.put("createdAt", createdAt);
|
||||
|
||||
@ -114,7 +115,7 @@ public class BatUser extends ProfileHolder {
|
||||
|
||||
MongoService.INSTANCE.getUsersCollection().replaceOne(
|
||||
new org.bson.Document("_id", id),
|
||||
this.getDocument(),
|
||||
document,
|
||||
new ReplaceOptions().upsert(true)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user