|
@@ -41,10 +41,6 @@ class UserGroupRelation {
|
|
|
return this._crowi;
|
|
return this._crowi;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- static init() {
|
|
|
|
|
- this.removeAllInvalidRelations();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* remove all invalid relations that has reference to unlinked document
|
|
* remove all invalid relations that has reference to unlinked document
|
|
|
*/
|
|
*/
|
|
@@ -288,6 +284,5 @@ module.exports = function(crowi) {
|
|
|
UserGroupRelation.crowi = crowi;
|
|
UserGroupRelation.crowi = crowi;
|
|
|
schema.loadClass(UserGroupRelation);
|
|
schema.loadClass(UserGroupRelation);
|
|
|
const model = mongoose.model('UserGroupRelation', schema);
|
|
const model = mongoose.model('UserGroupRelation', schema);
|
|
|
- model.init();
|
|
|
|
|
return model;
|
|
return model;
|
|
|
};
|
|
};
|