Merge pull request #164 from miyucchi/development

Fix counter (Create a new account if exists issue)
This commit is contained in:
Melledy 2022-04-23 15:26:14 -07:00 committed by GitHub
commit 81ee9a00a2

View File

@ -101,7 +101,7 @@ public final class DatabaseManager {
}
public static synchronized int getNextId(Class<?> c) {
DatabaseCounter counter = getDatastore().find(DatabaseCounter.class).filter(Filters.eq("_id", c.getName())).first();
DatabaseCounter counter = getDatastore().find(DatabaseCounter.class).filter(Filters.eq("_id", c.getSimpleName())).first();
if (counter == null) {
counter = new DatabaseCounter(c.getSimpleName());
}