Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kontr 2.0
Portal API Backend
Commits
a24c2841
Verified
Commit
a24c2841
authored
Aug 05, 2018
by
Peter Stanko
Browse files
Whitelisted the description
parent
c35ce480
Pipeline
#12963
failed with stage
in 16 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
portal/rest/schemas.py
View file @
a24c2841
...
...
@@ -338,7 +338,7 @@ course_schema = CourseSchema(strict=True)
course_schema_reduced
=
CourseSchema
(
strict
=
True
,
only
=
(
*
ALWAYS_ALLOWED
,
'name'
,
'codename'
,))
courses_schema
=
CourseSchema
(
many
=
True
,
only
=
(
*
ALWAYS_ALLOWED
,
'name'
,
'codename'
))
*
ALWAYS_ALLOWED
,
'name'
,
'codename'
,
'description'
))
course_import_schema
=
CourseImportSchema
(
strict
=
True
)
group_schema
=
GroupSchema
(
strict
=
True
)
groups_schema
=
GroupSchema
(
many
=
True
,
only
=
(
...
...
portal/service/courses.py
View file @
a24c2841
...
...
@@ -52,7 +52,7 @@ def delete_course(course: Course):
def
__set_course_props
(
course
:
Course
,
data
:
dict
):
return
general
.
update_entity
(
course
,
data
,
allowed
=
[
'name'
,
'codename'
])
return
general
.
update_entity
(
course
,
data
,
allowed
=
[
'name'
,
'codename'
,
'description'
])
def
update_course
(
course
:
Course
,
data
:
dict
)
->
Course
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment