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
2fb85ba7
Commit
2fb85ba7
authored
Sep 23, 2018
by
Barbora Kompišová
Browse files
Update schemas.py
parent
5e824113
Pipeline
#13283
passed with stage
in 12 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
portal/rest/schemas.py
View file @
2fb85ba7
...
@@ -303,7 +303,7 @@ class SecretSchema(BaseSchema, Schema):
...
@@ -303,7 +303,7 @@ class SecretSchema(BaseSchema, Schema):
"""
"""
name
=
fields
.
Str
()
name
=
fields
.
Str
()
expires_at
=
fields
.
LocalDateTime
(
allow_none
=
True
)
expires_at
=
fields
.
LocalDateTime
(
allow_none
=
True
)
client
=
NESTED
(
'client'
)
client
=
NESTED
[
'client'
]
class
CourseImportConfigSchema
(
Schema
):
class
CourseImportConfigSchema
(
Schema
):
...
@@ -391,8 +391,8 @@ class Schemas:
...
@@ -391,8 +391,8 @@ class Schemas:
'courses'
:
(
*
CODENAME_W_DESC
,),
'courses'
:
(
*
CODENAME_W_DESC
,),
'config_reduced'
:
(
*
ALWAYS_ALLOWED
,
'project'
,
'submissions_allowed_from'
,
'config_reduced'
:
(
*
ALWAYS_ALLOWED
,
'project'
,
'submissions_allowed_from'
,
'submissions_allowed_to'
,
'file_whitelist'
),
'submissions_allowed_to'
,
'file_whitelist'
),
'secrets'
:
(
*
ALWAYS_ALLOWED
,
'name'
,
'expires_at'
),
'secrets'
:
(
*
ALWAYS_ALLOWED
,
'name'
,
'expires_at'
,
'client.id'
,
'client.type'
,
'client.name'
,
'client.codename'
),
'secret'
:
(
*
ALWAYS_ALLOWED
,
'name'
,
'expires_at'
)
'secret'
:
(
*
ALWAYS_ALLOWED
,
'name'
,
'expires_at'
,
'client.id'
,
'client.type'
,
'client.name'
,
'client.codename'
)
}
}
def
__get_schema
(
self
,
schema_klass
,
select_params
=
None
,
only
=
None
,
strict
=
True
,
**
kwargs
):
def
__get_schema
(
self
,
schema_klass
,
select_params
=
None
,
only
=
None
,
strict
=
True
,
**
kwargs
):
...
...
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