You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"id": 1699958179804,"name": "Toilets uphill from groundwater sources","order": 10,"type": "option","tooltip": {"text": "INTERVIEW: what percentage of household toilets are located uphill from (above) the nearest groundwater sources?\nToilet uphill of groundwater source: the toilet is located at a higher point than (above) the groundwater source (borehole, dug well or spring)"},"required": false,"meta": false,"questionGroupId": 1699951538607,"option": []// empty options},
or:
{"id": 1699958179804,"name": "Toilets uphill from groundwater sources","order": 10,"type": "option","tooltip": {"text": "INTERVIEW: what percentage of household toilets are located uphill from (above) the nearest groundwater sources?\nToilet uphill of groundwater source: the toilet is located at a higher point than (above) the groundwater source (borehole, dug well or spring)"},"required": false,"meta": false,"questionGroupId": 1699951538607,"option": [{"code": null,"id": 1702283825467,"name": "",// name is blank"order": 2}]},
Server will return an internal server error.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/app/akvo/core_forms/views/form.py", line 95, in put
serializer.update(
File "/app/akvo/core_forms/serializers/form.py", line 146, in update
serializer.update(
File "/app/akvo/core_forms/serializers/question_group.py", line 111, in update
serializer.update(
File "/app/akvo/core_forms/serializers/question.py", line 269, in update
new_opt_ids = [no.get('id') fornoin new_option_data]
Problem: validation in Serializer class
To replicate:
Create New Question
Choose Option type
Leave the Option Blank
Save
The text was updated successfully, but these errors were encountered:
IF we send blank options:
or:
Server will return an internal server error.
Problem: validation in Serializer class
To replicate:
The text was updated successfully, but these errors were encountered: