From 036ff72728c7e35536bd0812929fe9892b12231b Mon Sep 17 00:00:00 2001 From: Saeed Bashir Date: Mon, 12 Aug 2024 21:40:25 +0500 Subject: [PATCH] fix: fix coredata crash on primary course (#64) --- 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)