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
528e23f0
Verified
Commit
528e23f0
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Add distincts to absence query set to prevent double entries
parent
509a8522
No related branches found
No related tags found
1 merge request
!178
Resolve "Show abbreviations in the substitution plan only once"
Pipeline
#15418
passed
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+1
-0
1 addition, 0 deletions
CHANGELOG.rst
aleksis/apps/chronos/managers.py
+3
-3
3 additions, 3 deletions
aleksis/apps/chronos/managers.py
with
4 additions
and
3 deletions
CHANGELOG.rst
+
1
−
0
View file @
528e23f0
...
...
@@ -14,6 +14,7 @@ Fixed
* Migration path was ambigious
* Unique constraints for breaks and substitutions were too tight
* Absences in substitutions list were displayed multiple times.
`2.0b0`_ - 2021-05-21
---------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/chronos/managers.py
+
3
−
3
View file @
528e23f0
...
...
@@ -600,13 +600,13 @@ class AbsenceQuerySet(DateRangeQuerySetMixin, SchoolTermRelatedQuerySet):
"""
QuerySet with custom query methods for absences.
"""
def
absent_teachers
(
self
):
return
Person
.
objects
.
filter
(
absences__in
=
self
).
order_by
(
"
short_name
"
)
return
Person
.
objects
.
filter
(
absences__in
=
self
).
distinct
().
order_by
(
"
short_name
"
)
def
absent_groups
(
self
):
return
Group
.
objects
.
filter
(
absences__in
=
self
).
order_by
(
"
short_name
"
)
return
Group
.
objects
.
filter
(
absences__in
=
self
).
distinct
().
order_by
(
"
short_name
"
)
def
absent_rooms
(
self
):
return
Person
.
objects
.
filter
(
absences__in
=
self
).
order_by
(
"
short_name
"
)
return
Person
.
objects
.
filter
(
absences__in
=
self
).
distinct
().
order_by
(
"
short_name
"
)
class
HolidayQuerySet
(
QuerySet
,
DateRangeQuerySetMixin
):
...
...
This diff is collapsed.
Click to expand it.
Jonathan Weth
@hansegucker
mentioned in commit
f989d5c9
·
3 years ago
mentioned in commit
f989d5c9
mentioned in commit f989d5c96db6077029499eec970eaa146f6067dc
Toggle commit list
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