Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
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-Chronos
Commits
f99d9ce4
Verified
Commit
f99d9ce4
authored
5 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Use has_person util in my_timetable
parent
f55ce220
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!31
Biscuit merge. Closes #53.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/views.py
+2
-1
2 additions, 1 deletion
aleksis/apps/chronos/views.py
with
2 additions
and
1 deletion
aleksis/apps/chronos/views.py
+
2
−
1
View file @
f99d9ce4
...
...
@@ -25,6 +25,7 @@ from .util.min_max import (
)
from
.util.prev_next
import
get_next_relevant_day
,
get_prev_next_by_day
from
.util.weeks
import
CalendarWeek
,
get_weeks_for_year
from
aleksis.core.util.core_helpers
import
has_person
@login_required
...
...
@@ -63,7 +64,7 @@ def my_timetable(
else
:
wanted_day
=
get_next_relevant_day
(
timezone
.
now
().
date
(),
datetime
.
now
().
time
())
if
request
.
user
.
person
:
if
has_person
(
request
.
user
)
:
person
=
request
.
user
.
person
if
person
.
is_teacher
:
...
...
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