-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Describe the bug
Manually creating a projector in the client, without setting is_internal will cause the check_database_all presenter to return a broken verdict. This happens because the client sends null as the value of one field and the backend doesn't stop this.
How To Reproduce
Payload from client (handle_request)
First
[{"action":"projector.create","data":[{"meeting_id":2,"name":"pro jek tor","is_internal":null}]}]
then
[{"presenter":"check_database_all","data":{}}]
Response from backend
For first request
{"status_code": 200, "success": true, "message": "Actions handled successfully", "results": [[{"id": 5, "sequential_number": 3}]]}
For database check
[{"ok": false, "errors": "\tprojector/5: Missing fields is_internal"}]
Expected behavior
The projector.create action should not allow None as a field value for is_internal
Ergo:
- ensure the backend-action does not allow
Nonefor theis_internalfield. - write a migration to fix any old inconsistencies caused by this
It should also be ensured that projector.update doesn't have the same problem