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
698c3ef1
Commit
698c3ef1
authored
4 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Use SchoolYear model from core
parent
ceffbe1b
No related branches found
Branches containing commit
No related tags found
1 merge request
!62
WIP: Resolve "Make Chronos work with current core"
Pipeline
#2649
failed
4 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/models.py
+2
-2
2 additions, 2 deletions
aleksis/apps/chronos/models.py
with
2 additions
and
2 deletions
aleksis/apps/chronos/models.py
+
2
−
2
View file @
698c3ef1
...
@@ -36,7 +36,7 @@ from aleksis.apps.chronos.managers import (
...
@@ -36,7 +36,7 @@ from aleksis.apps.chronos.managers import (
)
)
from
aleksis.apps.chronos.util.format
import
format_m2m
from
aleksis.apps.chronos.util.format
import
format_m2m
from
aleksis.core.mixins
import
ExtensibleModel
from
aleksis.core.mixins
import
ExtensibleModel
from
aleksis.core.models
import
DashboardWidget
from
aleksis.core.models
import
DashboardWidget
,
SchoolYear
from
aleksis.core.util.core_helpers
import
has_person
from
aleksis.core.util.core_helpers
import
has_person
...
@@ -68,7 +68,7 @@ class TimePeriod(ExtensibleModel):
...
@@ -68,7 +68,7 @@ class TimePeriod(ExtensibleModel):
year
=
date
.
today
().
year
year
=
date
.
today
().
year
week_number
=
week
or
getattr
(
self
,
"
_week
"
,
None
)
or
CalendarWeek
().
week
week_number
=
week
or
getattr
(
self
,
"
_week
"
,
None
)
or
CalendarWeek
().
week
if
week_number
<
self
.
s
chool
.
current
_term
.
date_start
.
isocalendar
()[
1
]:
if
week_number
<
S
chool
Year
.
current
.
date_start
.
isocalendar
()[
1
]:
year
+=
1
year
+=
1
wanted_week
=
CalendarWeek
(
year
=
year
,
week
=
week_number
)
wanted_week
=
CalendarWeek
(
year
=
year
,
week
=
week_number
)
...
...
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