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
17e8450c
Commit
17e8450c
authored
11 months ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Make subject and teachers editable in backend
parent
98647a7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!352
Draft: Resolve "Add dialog with each lesson's students"
,
!350
Resolve "Add simple course book list"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/schema/documentation.py
+7
-0
7 additions, 0 deletions
aleksis/apps/alsijil/schema/documentation.py
with
7 additions
and
0 deletions
aleksis/apps/alsijil/schema/documentation.py
+
7
−
0
View file @
17e8450c
...
...
@@ -12,7 +12,9 @@ from graphene_django_cud.mutations import (
from
guardian.shortcuts
import
get_objects_for_user
from
aleksis.apps.chronos.models
import
LessonEvent
from
aleksis.apps.cursus.models
import
Subject
from
aleksis.apps.cursus.schema
import
CourseType
,
SubjectType
from
aleksis.core.models
import
Person
from
aleksis.core.schema.base
import
(
DeleteMutation
,
DjangoFilterMixin
,
...
...
@@ -196,6 +198,11 @@ class DocumentationBatchCreateOrUpdateMutation(graphene.Mutation):
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
))
obj
.
save
()
return
obj
...
...
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