check if changes before save context
This commit is contained in:
parent
ff83ed29d4
commit
0be04eac30
1 changed files with 3 additions and 1 deletions
|
|
@ -197,7 +197,9 @@ class PasswordStore {
|
|||
passwordEntity.synced = true
|
||||
}
|
||||
do {
|
||||
try context.save()
|
||||
if context.hasChanges {
|
||||
try context.save()
|
||||
}
|
||||
} catch {
|
||||
fatalError("Failed to save: \(error)")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue