Added instructor availability model and admin

This commit is contained in:
2025-12-02 12:00:15 +01:00
parent 5d1686f24b
commit 3ee2269d70
10 changed files with 236 additions and 9 deletions

View File

@@ -12,6 +12,6 @@ def has_edit_permission(request: HttpRequest, obj: WeekPreference | None = None)
if not student.active:
return False
current_week: int = date.today().isocalendar().week
if obj and current_week > obj.week or not student.active:
if obj and (current_week > obj.week or not student.active):
return False
return True