Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
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-Alsijil
Commits
32cd07ae
Commit
32cd07ae
authored
7 months ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Fix managers in alsijil
parent
54329c85
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!392
Resolve "Absence creation form should support datetimes"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/managers.py
+6
-4
6 additions, 4 deletions
aleksis/apps/alsijil/managers.py
with
6 additions
and
4 deletions
aleksis/apps/alsijil/managers.py
+
6
−
4
View file @
32cd07ae
...
...
@@ -11,7 +11,7 @@ from django.utils.translation import gettext as _
from
calendarweek
import
CalendarWeek
from
aleksis.apps.chronos.managers
import
DateRangeQuerySetMixin
from
aleksis.core.managers
import
AlekSISBaseManagerWithoutMigrations
,
Polymorphic
Base
Manager
from
aleksis.core.managers
import
AlekSISBaseManagerWithoutMigrations
,
Recurrence
PolymorphicManager
if
TYPE_CHECKING
:
from
aleksis.core.models
import
Group
...
...
@@ -189,7 +189,7 @@ class GroupRoleAssignmentQuerySet(DateRangeQuerySetMixin, QuerySet):
return
self
.
filter
(
Q
(
groups
=
group
)
|
Q
(
groups__child_groups
=
group
))
class
DocumentationManager
(
Polymorphic
Base
Manager
):
class
DocumentationManager
(
Recurrence
PolymorphicManager
):
"""
Manager adding specific methods to documentations.
"""
def
get_queryset
(
self
):
...
...
@@ -205,9 +205,11 @@ class DocumentationManager(PolymorphicBaseManager):
)
class
ParticipationStatusManager
(
Polymorphic
Base
Manager
):
class
ParticipationStatusManager
(
Recurrence
PolymorphicManager
):
"""
Manager adding specific methods to participation statuses.
"""
def
get_queryset
(
self
):
"""
Ensure often used related data are loaded as well.
"""
return
super
().
get_queryset
().
select_related
(
"
person
"
,
"
absence_reason
"
,
"
base_absence
"
)
# return super().get_queryset().select_related("person", "absence_reason", "base_absence")
# TODO: `Field ParticipationStatus.person cannot be both deferred and traversed using select_related at the same time.`
return
super
().
get_queryset
()
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