@dynamatix/cat-shared 0.0.69 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/models/audit.model.js
CHANGED
|
@@ -11,6 +11,6 @@ const auditSchema = new mongoose.Schema({
|
|
|
11
11
|
externalData: mongoose.Schema.Types.Mixed
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
const AuditLog = mongoose.model('AuditLog', auditSchema);
|
|
14
|
+
const AuditLog = mongoose.models.AuditLog || mongoose.model('AuditLog', auditSchema);
|
|
15
15
|
|
|
16
16
|
export default AuditLog;
|
|
@@ -252,6 +252,6 @@ const formConfigurationSchema = new mongoose.Schema({
|
|
|
252
252
|
}
|
|
253
253
|
}, { timestamps: true });
|
|
254
254
|
|
|
255
|
-
const FormConfigurationModel = mongoose.model('FormConfiguration', formConfigurationSchema);
|
|
255
|
+
const FormConfigurationModel = mongoose.models.FormConfigurationModel || mongoose.model('FormConfiguration', formConfigurationSchema);
|
|
256
256
|
|
|
257
257
|
export default FormConfigurationModel;
|
|
@@ -8,5 +8,5 @@ const valueReferenceMapSchema = new mongoose.Schema({
|
|
|
8
8
|
|
|
9
9
|
valueReferenceMapSchema.index({ field: 1 }, { unique: true });
|
|
10
10
|
|
|
11
|
-
const ValueReferenceMapModel = mongoose.model('ValueReferenceMap', valueReferenceMapSchema);
|
|
11
|
+
const ValueReferenceMapModel = mongoose.models.ValueReferenceMapModel || mongoose.model('ValueReferenceMap', valueReferenceMapSchema);
|
|
12
12
|
export default ValueReferenceMapModel;
|