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
38d200f6
Verified
Commit
38d200f6
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Fix usage of SchoolTerm (replace old syntax)
parent
bc3bb724
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!63
Fix some date/time functions and add new helper functions
Changes
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 @
38d200f6
...
@@ -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
,
SchoolTerm
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
Term
.
current_term
.
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