Fix crashing bug that can happen if a CloudKit record gets into an invalid state.

This commit is contained in:
Maurice Parker committed 2020-12-13 12:01:55 -06:00
1 parent 69acfc5aa6
commit bcd4d4e076
2 files changed
+11 -1

No files matched your search

@@ -114,6 +114,11 @@ struct SyncStatusTable: DatabaseTable {
}
func resetSelectedForProcessing(_ articleIDs: [String], completion: DatabaseCompletionBlock? = nil) {
guard !articleIDs.isEmpty else {
callCompletion(completion, nil)
return
}
queue.runInTransaction { databaseResult in
func makeDatabaseCall(_ database: FMDatabase) {
@@ -134,6 +139,11 @@ struct SyncStatusTable: DatabaseTable {
}
func deleteSelectedForProcessing(_ articleIDs: [String], completion: DatabaseCompletionBlock? = nil) {
guard !articleIDs.isEmpty else {
callCompletion(completion, nil)
return
}
queue.runInTransaction { databaseResult in
func makeDatabaseCall(_ database: FMDatabase) {