Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
42f3be7d
Verified
Commit
42f3be7d
authored
5 years ago
by
mirabilos
Committed by
mirabilos
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Catch when no lesson was given or can be autodiscovered.
A nicer error page was supposed to be there, but apparently isn’t.
parent
2149555e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biscuit/apps/alsijil/views.py
+4
-1
4 additions, 1 deletion
biscuit/apps/alsijil/views.py
with
4 additions
and
1 deletion
biscuit/apps/alsijil/views.py
+
4
−
1
View file @
42f3be7d
...
...
@@ -3,7 +3,7 @@ from typing import Optional
from
django.contrib.auth.decorators
import
login_required
from
django.db.models
import
Exists
,
OuterRef
,
Q
from
django.http
import
HttpRequest
,
HttpResponse
from
django.http
import
HttpRequest
,
HttpResponse
,
HttpResponseNotFound
from
django.shortcuts
import
render
from
django.views.decorators.cache
import
cache_page
...
...
@@ -71,6 +71,9 @@ def lesson(request: HttpRequest, week: Optional[int] = None, period_id: Optional
context
[
'
lesson_documentation_form
'
]
=
lesson_documentation_form
context
[
'
personal_note_formset
'
]
=
personal_note_formset
else
:
#XXX TODO: nice error page (“no lesson currently running for you?” or so)
return
HttpResponseNotFound
(
"
no current lesson found for you
"
)
return
render
(
request
,
'
alsijil/lesson.html
'
,
context
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment