fixed shouldUpdateFromImportSource() not called from importUniqueObject() (fixes #31)

This commit is contained in:
John Rommel Estropia
2015-12-29 08:25:06 +08:00
parent c229af19a2
commit 6c28594e41
3 changed files with 7 additions and 2 deletions

View File

@@ -123,6 +123,11 @@ public extension BaseDataTransaction {
if let object = self.fetchOne(From(T), Where(uniqueIDKeyPath, isEqualTo: uniqueIDValue)) {
guard T.shouldUpdateFromImportSource(source, inTransaction: self) else {
return nil
}
try object.updateFromImportSource(source, inTransaction: self)
return object
}