Remove redundant author validation check in collection_take_start and streamline access control in ExamOrCollectionGenericBase
This commit is contained in:
@@ -768,6 +768,9 @@ class ExamOrCollectionGenericBase(models.Model, AuthorMixin):
|
||||
Raises:
|
||||
Http404: If user does not have access
|
||||
"""
|
||||
if user is not None and self.is_author(user):
|
||||
return
|
||||
|
||||
# If we are limiting by dates check that the current date is within the range
|
||||
if self.restrict_to_dates:
|
||||
if self.start_date >= timezone.now() or (
|
||||
|
||||
Reference in New Issue
Block a user