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
72dc2ff3
Commit
72dc2ff3
authored
10 months ago
by
permcu
Committed by
Julian
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Properly set person & reason by id
parent
c2869295
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!360
Resolve "Add absence management to course book student dialog"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/schema/absences.py
+6
-7
6 additions, 7 deletions
aleksis/apps/alsijil/schema/absences.py
with
6 additions
and
7 deletions
aleksis/apps/alsijil/schema/absences.py
+
6
−
7
View file @
72dc2ff3
...
...
@@ -67,25 +67,24 @@ class AbsencesBatchCreateMutation(graphene.Mutation):
# Create a ParticipationStatus for each documentation
for
doc
in
docs
:
# TODO: Is ID for enough for person&reason OR should it
# resolve to django object first?
# Set person & absence_reason directly from id
ParticipationStatus
.
objects
.
create
(
person
=
person
,
person
_id
=
person
,
related_documentation
=
doc
,
absence_reason
=
reason
,
absence_reason
_id
=
reason
,
)
# If there are still dummy documentations in the future
# create a Kolego Absence
if
future
:
# TODO: Should probably lookup person&reason as well
# TODO: Are date_start & date_end from CalendarEvent enough
# or more needed?
# Set reason & person directly from id
Absence
.
objects
.
create
(
date_start
=
datetime
.
now
().
date
(),
date_end
=
end
,
reason
=
reason
,
person
=
person
,
reason
_id
=
reason
,
person
_id
=
person
,
comment
=
comment
,
)
...
...
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