From e85e9704fadfbb25d5ceea7d4797949e8cd0001d Mon Sep 17 00:00:00 2001 From: Anton Yarmolenko Date: Mon, 30 Sep 2024 10:22:32 +0200 Subject: [PATCH] fix: fix coredata crash on primary course (#64) (#518) Co-authored-by: Saeed Bashir --- OpenEdX/Data/DashboardPersistence.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenEdX/Data/DashboardPersistence.swift b/OpenEdX/Data/DashboardPersistence.swift index ab0f14e52..0a55aeaf7 100644 --- a/OpenEdX/Data/DashboardPersistence.swift +++ b/OpenEdX/Data/DashboardPersistence.swift @@ -231,7 +231,7 @@ public class DashboardPersistence: DashboardPersistenceProtocol { // swiftlint:enable function_body_length func clearOldEnrollmentsData() { - context.perform {[context] in + context.performAndWait {[context] in let fetchRequest1: NSFetchRequest = CDDashboardCourse.fetchRequest() let batchDeleteRequest1 = NSBatchDeleteRequest(fetchRequest: fetchRequest1)