mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-23 18:01:23 +01:00
don't warn about uncommitted changes when there aren't any
This commit is contained in:
@@ -152,7 +152,7 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
|
|||||||
self.transactionQueue.async {
|
self.transactionQueue.async {
|
||||||
|
|
||||||
self.closure(transaction: self)
|
self.closure(transaction: self)
|
||||||
if !self.isCommitted {
|
if !self.isCommitted && self.hasChanges {
|
||||||
|
|
||||||
HardcoreData.log(.Warning, message: "The closure for the <\(self.dynamicType)> completed without being committed. All changes made within the transaction were discarded.")
|
HardcoreData.log(.Warning, message: "The closure for the <\(self.dynamicType)> completed without being committed. All changes made within the transaction were discarded.")
|
||||||
}
|
}
|
||||||
@@ -164,7 +164,7 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
|
|||||||
self.transactionQueue.sync {
|
self.transactionQueue.sync {
|
||||||
|
|
||||||
self.closure(transaction: self)
|
self.closure(transaction: self)
|
||||||
if !self.isCommitted {
|
if !self.isCommitted && self.hasChanges {
|
||||||
|
|
||||||
HardcoreData.log(.Warning, message: "The closure for the <\(self.dynamicType)> completed without being committed. All changes made within the transaction were discarded.")
|
HardcoreData.log(.Warning, message: "The closure for the <\(self.dynamicType)> completed without being committed. All changes made within the transaction were discarded.")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public final class SynchronousDataTransaction: BaseDataTransaction {
|
|||||||
self.transactionQueue.sync {
|
self.transactionQueue.sync {
|
||||||
|
|
||||||
self.closure(transaction: self)
|
self.closure(transaction: self)
|
||||||
if !self.isCommitted {
|
if !self.isCommitted && self.hasChanges {
|
||||||
|
|
||||||
HardcoreData.log(.Warning, message: "The closure for the <\(self.dynamicType)> completed without being committed. All changes made within the transaction were discarded.")
|
HardcoreData.log(.Warning, message: "The closure for the <\(self.dynamicType)> completed without being committed. All changes made within the transaction were discarded.")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user