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
e9f8e9ed
Commit
e9f8e9ed
authored
10 months ago
by
Julian
Committed by
permcu
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Update newly created documentations as well
parent
726e20f2
No related branches found
Branches containing commit
No related tags found
1 merge request
!356
Add dialog for creation of long-term absences
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/schema/documentation.py
+15
-15
15 additions, 15 deletions
aleksis/apps/alsijil/schema/documentation.py
with
15 additions
and
15 deletions
aleksis/apps/alsijil/schema/documentation.py
+
15
−
15
View file @
e9f8e9ed
...
...
@@ -98,30 +98,30 @@ class DocumentationBatchCreateOrUpdateMutation(graphene.Mutation):
# Sadly, we can't use the update_or_create method since create_defaults
# is only introduced in Django 5.0
if
_id
.
startswith
(
"
DUMMY
"
):
return
Documentation
.
create_from_lesson_event
(
obj
=
Documentation
.
create_from_lesson_event
(
info
.
context
.
user
,
*
Documentation
.
parse_dummy
(
_id
),
)
else
:
obj
=
Documentation
.
objects
.
get
(
id
=
_id
)
if
not
info
.
context
.
user
.
has_perm
(
"
alsijil.edit_documentation_rule
"
,
obj
):
raise
PermissionDenied
()
if
not
info
.
context
.
user
.
has_perm
(
"
alsijil.edit_documentation_rule
"
,
obj
):
raise
PermissionDenied
()
if
doc
.
topic
is
not
None
:
obj
.
topic
=
doc
.
topic
if
doc
.
homework
is
not
None
:
obj
.
homework
=
doc
.
homework
if
doc
.
group_note
is
not
None
:
obj
.
group_note
=
doc
.
group_note
if
doc
.
topic
is
not
None
:
obj
.
topic
=
doc
.
topic
if
doc
.
homework
is
not
None
:
obj
.
homework
=
doc
.
homework
if
doc
.
group_note
is
not
None
:
obj
.
group_note
=
doc
.
group_note
if
doc
.
subject
is
not
None
:
obj
.
subject
=
Subject
.
objects
.
get
(
pk
=
doc
.
subject
)
if
doc
.
teachers
is
not
None
:
obj
.
teachers
.
set
(
Person
.
objects
.
filter
(
pk__in
=
doc
.
teachers
))
if
doc
.
subject
is
not
None
:
obj
.
subject
=
Subject
.
objects
.
get
(
pk
=
doc
.
subject
)
if
doc
.
teachers
is
not
None
:
obj
.
teachers
.
set
(
Person
.
objects
.
filter
(
pk__in
=
doc
.
teachers
))
obj
.
save
()
return
obj
obj
.
save
()
return
obj
@classmethod
def
mutate
(
cls
,
root
,
info
,
input
):
# noqa
...
...
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