simplified new entity ID allocation

This commit is contained in:
azivner
2018-04-02 20:30:00 -04:00
parent e2921a648d
commit 277368ab43
9 changed files with 15 additions and 53 deletions

View File

@@ -8,9 +8,7 @@ class ApiToken extends Entity {
static get primaryKeyName() { return "apiTokenId"; }
beforeSaving() {
if (!this.apiTokenId) {
this.apiTokenId = utils.newApiTokenId();
}
super.beforeSaving();
if (!this.isDeleted) {
this.isDeleted = false;