Added instructor availability model and admin
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user