Explorar o código

BugFix for keepOriginal

Yuki Takei %!s(int64=6) %!d(string=hai) anos
pai
achega
e18988dd98
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/server/service/import.js

+ 1 - 1
src/server/service/import.js

@@ -113,7 +113,7 @@ class ImportService {
     // Model
     if (schema != null) {
       // ObjectID
-      if (schema[propertyName].instance === 'ObjectID' && ObjectId.isValid(value)) {
+      if (schema[propertyName] != null && schema[propertyName].instance === 'ObjectID' && ObjectId.isValid(value)) {
         _value = ObjectId(value);
       }
     }