Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit 857f2cf

Browse files
NotSpecialtemparus
authored andcommitted
Studydocs: Always require type and add options.
We do not wish to allow studydocs without type anymore, so the `type` field is not not nullable and required. Furthermore, we wish to differentiate between spring and autumn exams for better filtering, so the previous exam type is replaced. Closes #422
1 parent 9be541b commit 857f2cf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

amivapi/studydocs/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ def _validate_allow_summary(self, *args, **kwargs):
182182
'type': {
183183
'example': 'cheat sheets',
184184
'type': 'string',
185-
'nullable': True,
186-
'default': None,
187-
'allowed': ['exams', 'oral exams',
185+
'required': True,
186+
'nullable': False,
187+
'allowed': ['spring exams', 'autumn exams', 'oral exams',
188188
'cheat sheets', 'study guides',
189189
'lecture documents', 'exercises'],
190190
'allow_summary': True,

0 commit comments

Comments
 (0)