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
01195ff2
Commit
01195ff2
authored
2 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Update personal Note creation mutation to use a lesson documentation as an argument
parent
5ff3ca63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#80104
failed
2 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/schema.py
+9
-10
9 additions, 10 deletions
aleksis/apps/alsijil/schema.py
with
9 additions
and
10 deletions
aleksis/apps/alsijil/schema.py
+
9
−
10
View file @
01195ff2
...
...
@@ -68,9 +68,7 @@ class PersonalNoteMutation(DjangoModelFormMutation):
class
CreatePersonalNoteMutation
(
graphene
.
Mutation
):
class
Arguments
:
person_id
=
graphene
.
ID
(
required
=
True
)
lesson_period_id
=
graphene
.
ID
(
required
=
True
)
week
=
graphene
.
Int
(
required
=
True
)
year
=
graphene
.
Int
(
required
=
True
)
lesson_documentation
=
graphene
.
ID
(
required
=
True
)
late
=
graphene
.
Int
(
required
=
False
)
absent
=
graphene
.
Boolean
(
required
=
False
)
...
...
@@ -87,9 +85,7 @@ class CreatePersonalNoteMutation(graphene.Mutation):
root
,
info
,
person_id
,
lesson_period_id
,
week
,
year
,
lesson_documentation
,
late
=
0
,
absent
=
False
,
excused
=
False
,
...
...
@@ -100,20 +96,23 @@ class CreatePersonalNoteMutation(graphene.Mutation):
if
extra_marks
is
None
:
extra_marks
=
[]
person
=
Person
.
objects
.
get
(
pk
=
person_id
)
lesson_
per
io
d
=
Lesson
Per
io
d
.
objects
.
get
(
pk
=
lesson_
period_id
)
lesson_
documentat
io
n
=
Lesson
Documentat
io
n
.
objects
.
get
(
pk
=
lesson_
documentation
)
extra_marks
=
ExtraMark
.
objects
.
filter
(
pk__in
=
extra_marks
)
personal_note
=
PersonalNote
.
objects
.
create
(
person
=
person
,
lesson_period
=
lesson_period
,
event
=
lesson_documentation
.
event
,
extra_lesson
=
lesson_documentation
.
extra_lesson
,
lesson_period
=
lesson_documentation
.
lesson_period
,
late
=
late
,
absent
=
absent
,
excused
=
excused
,
excuse_type
=
excuse_type
,
remarks
=
remarks
,
week
=
week
,
year
=
year
,
week
=
lesson_documentation
.
week
,
year
=
lesson_documentation
.
year
,
)
personal_note
.
extra_marks
.
set
(
extra_marks
)
personal_note
.
groups_of_person
.
set
(
person
.
member_of
.
all
())
personal_note
.
save
()
return
CreatePersonalNoteMutation
(
personal_note
=
personal_note
)
...
...
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