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
Merge requests
!62
WIP: Resolve "Make Chronos work with current core"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
WIP: Resolve "Make Chronos work with current core"
87-make-chronos-work-with-current-core
into
master
Overview
1
Commits
2
Pipelines
3
Changes
1
Closed
Julian
requested to merge
87-make-chronos-work-with-current-core
into
master
4 years ago
Overview
1
Commits
2
Pipelines
3
Changes
1
Expand
Closes
#87 (closed)
0
0
Merge request reports
Viewing commit
967b29a1
Prev
Next
Show latest version
1 file
+
2
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
967b29a1
Rename SchoolYear to SchoolTerm
· 967b29a1
Julian
authored
4 years ago
aleksis/apps/chronos/models.py
+
2
−
2
Options
@@ -36,7 +36,7 @@ from aleksis.apps.chronos.managers import (
)
from
aleksis.apps.chronos.util.format
import
format_m2m
from
aleksis.core.mixins
import
ExtensibleModel
from
aleksis.core.models
import
DashboardWidget
,
School
Year
from
aleksis.core.models
import
DashboardWidget
,
School
Term
from
aleksis.core.util.core_helpers
import
has_person
@@ -68,7 +68,7 @@ class TimePeriod(ExtensibleModel):
year
=
date
.
today
().
year
week_number
=
week
or
getattr
(
self
,
"
_week
"
,
None
)
or
CalendarWeek
().
week
if
week_number
<
School
Year
.
current
.
date_start
.
isocalendar
()[
1
]:
if
week_number
<
School
Term
.
current
.
date_start
.
isocalendar
()[
1
]:
year
+=
1
wanted_week
=
CalendarWeek
(
year
=
year
,
week
=
week_number
)
Loading