Add missing rollback in dictionary import error handling

This commit is contained in:
Beingpax 2025-12-28 12:47:21 +05:45
parent bf3c035e58
commit 93f8811d77

View File

@ -159,6 +159,8 @@ class DictionaryImportExportService {
self.showAlert(title: "Import Successful", message: message)
} catch {
// Rollback any unsaved changes to maintain consistency
context.rollback()
self.showAlert(title: "Import Error", message: "Error importing dictionary data: \(error.localizedDescription). The file might be corrupted or not in the correct format.")
}
} else {