Skip to content

Commit

Permalink
catch unset available_from
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Sep 21, 2021
1 parent 3206973 commit 6b1b1a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numbas_lti/views/attempt.py
Expand Up @@ -207,7 +207,7 @@ def dispatch(self,request,*args,**kwargs):
if not resource.is_available(request.user):
now = timezone.now()
available_from, available_until = resource.available_for_user(request.user)
if now < available_from:
if available_from is not None and now < available_from:
template = get_template('numbas_lti/not_available_yet.html')
raise PermissionDenied(template.render({'available_from': available_from}))

Expand Down

0 comments on commit 6b1b1a2

Please sign in to comment.