Fixed bug with new number of group on not current week
This commit is contained in:
@ -185,16 +185,6 @@ struct CreateEditClassView: View {
|
||||
.background(Color("background"))
|
||||
}
|
||||
}
|
||||
func delete(_ _class: ClassModel) throws {
|
||||
let context = provider.viewContext
|
||||
let existingClass = try context.existingObject(with: _class.objectID)
|
||||
context.delete(existingClass)
|
||||
Task (priority: .background) {
|
||||
try await context.perform {
|
||||
try context.save()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
Reference in New Issue
Block a user