Просмотр исходного кода

# Feature/196, 198, 199 Grouping users
* Fix userGroup model.
* Fix userGroupRelation model.

Tatsuya Ise 8 лет назад
Родитель
Сommit
07a070733d
2 измененных файлов с 1 добавлено и 2 удалено
  1. 1 1
      lib/models/userGroup.js
  2. 0 1
      lib/models/userGroupRelation.js

+ 1 - 1
lib/models/userGroup.js

@@ -14,7 +14,7 @@ module.exports = function(crowi) {
   userGroupSchema = new mongoose.Schema({
     userGroupId: String,
     image: String,
-    name: { type: String, required: true, unique: true, index: true },
+    name: { type: String, required: true, unique: true },
     createdAt: { type: Date, default: Date.now },
   });
   userGroupSchema.plugin(mongoosePaginate);

+ 0 - 1
lib/models/userGroupRelation.js

@@ -14,7 +14,6 @@ module.exports = function(crowi) {
     createdAt: { type: Date, default: Date.now },
   });
   userGroupRelationSchema.plugin(mongoosePaginate);
-  userGroupRelationSchema.plugin(uniqueValidator);
 
   // すべてのグループ所属関係を取得
   userGroupRelationSchema.statics.findAllRelation = function() {