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

Commit

Permalink
Studydocs: Always require type and add options.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
NotSpecial authored and temparus committed May 24, 2022
1 parent 9be541b commit 857f2cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions amivapi/studydocs/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ def _validate_allow_summary(self, *args, **kwargs):
'type': {
'example': 'cheat sheets',
'type': 'string',
'nullable': True,
'default': None,
'allowed': ['exams', 'oral exams',
'required': True,
'nullable': False,
'allowed': ['spring exams', 'autumn exams', 'oral exams',
'cheat sheets', 'study guides',
'lecture documents', 'exercises'],
'allow_summary': True,
Expand Down

0 comments on commit 857f2cf

Please sign in to comment.