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
74c849a3
Verified
Commit
74c849a3
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Add some small bug fixes for queries
parent
50fd338d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!78
Add some small bug fixes for queries
Pipeline
#3337
passed
4 years ago
Stage: test
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aleksis/apps/chronos/managers.py
+1
-1
1 addition, 1 deletion
aleksis/apps/chronos/managers.py
aleksis/apps/chronos/models.py
+1
-1
1 addition, 1 deletion
aleksis/apps/chronos/models.py
aleksis/apps/chronos/views.py
+1
-1
1 addition, 1 deletion
aleksis/apps/chronos/views.py
with
3 additions
and
3 deletions
aleksis/apps/chronos/managers.py
+
1
−
1
View file @
74c849a3
...
...
@@ -36,7 +36,7 @@ class ValidityRangeRelatedQuerySet(QuerySet):
def
for_validity_range
(
self
,
validity_range
:
"
ValidityRange
"
)
->
"
ValidityRangeRelatedQuerySet
"
:
return
self
.
filter
(
validity
_range
=
validity_range
)
return
self
.
filter
(
validity
=
validity_range
)
def
for_current_or_all
(
self
)
->
"
ValidityRangeRelatedQuerySet
"
:
"""
Get all objects related to current validity range.
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/chronos/models.py
+
1
−
1
View file @
74c849a3
...
...
@@ -379,7 +379,7 @@ class LessonSubstitution(ExtensibleModel):
@property
def
date
(
self
):
week
=
CalendarWeek
(
week
=
self
.
week
,
year
=
self
.
lesson_period
.
lesson
.
get_year
())
week
=
CalendarWeek
(
week
=
self
.
week
,
year
=
self
.
lesson_period
.
lesson
.
get_year
(
self
.
week
))
return
week
[
self
.
lesson_period
.
period
.
weekday
]
def
__str__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/chronos/views.py
+
1
−
1
View file @
74c849a3
...
...
@@ -33,7 +33,7 @@ def all_timetables(request: HttpRequest) -> HttpResponse:
teachers
=
Person
.
objects
.
annotate
(
lessons_count
=
Count
(
"
lessons_as_teacher
"
)
).
filter
(
lessons_count__gt
=
0
)
groups
=
Group
.
objects
.
annotate
(
groups
=
Group
.
objects
.
for_current_school_term_or_all
().
annotate
(
lessons_count
=
Count
(
"
lessons
"
),
child_lessons_count
=
Count
(
"
child_groups__lessons
"
),
)
...
...
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