Gunicorn django.request ERROR to settings/bulk/
/label Type: Bug Status: Need triage
Steps to reproduce
- Go to /manage/settings
- Section Sign-ups => change any options :
- Open registrations to new users or
- Enable manual sign-up validation
- Save change
What happens?
Get this error on web interface :
Error while saving settings
A server error occured
What is expected?
Change option
Context
Funkwhale version(s) affected: 0.21.1+git.f14858c2
- Browser type and version (for front-end bugs) Firefox 78.0b6 (64-bit)
- Instance configuration non-docker
Kernel : 5.7.2-arch1-1
Nginx : 1.18.0
PHP 7.4.7 (cli) (built: Jun 9 2020 19:37:15) ( NTS )
Python 3.8.3
pip 20.0.2
- Error messages, screenshots and logs :
Nginx :
[17/Jun/2020:14:27:46 +0200] "POST /api/v1/instance/admin/settings/bulk/ HTTP/2.0" 500 145 "https://funkwhale.eric.ovh/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0"
Gunicorn :
Jun 17 14:27:46 services gunicorn[878]: 2020-06-17 12:27:46,685 django.request ERROR Internal Server Error: /api/v1/instance/admin/settings/bulk/
Jun 17 14:27:46 services gunicorn[878]: Traceback (most recent call last):
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
Jun 17 14:27:46 services gunicorn[878]: response = get_response(request)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
Jun 17 14:27:46 services gunicorn[878]: response = self.process_exception_by_middleware(e, request)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
Jun 17 14:27:46 services gunicorn[878]: response = wrapped_callback(request, *callback_args, **callback_kwargs)
Jun 17 14:27:46 services gunicorn[878]: File "/usr/lib/python3.8/contextlib.py", line 75, in inner
Jun 17 14:27:46 services gunicorn[878]: return func(*args, **kwds)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Jun 17 14:27:46 services gunicorn[878]: return view_func(*args, **kwargs)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/rest_framework/viewsets.py", line 114, in view
Jun 17 14:27:46 services gunicorn[878]: return self.dispatch(request, *args, **kwargs)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/rest_framework/views.py", line 505, in dispatch
Jun 17 14:27:46 services gunicorn[878]: response = self.handle_exception(exc)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/rest_framework/views.py", line 465, in handle_exception
Jun 17 14:27:46 services gunicorn[878]: self.raise_uncaught_exception(exc)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
Jun 17 14:27:46 services gunicorn[878]: raise exc
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/rest_framework/views.py", line 502, in dispatch
Jun 17 14:27:46 services gunicorn[878]: response = handler(request, *args, **kwargs)
Jun 17 14:27:46 services gunicorn[878]: File "/usr/lib/python3.8/contextlib.py", line 75, in inner
Jun 17 14:27:46 services gunicorn[878]: return func(*args, **kwds)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/dynamic_preferences/api/viewsets.py", line 139, in bulk
Jun 17 14:27:46 services gunicorn[878]: s.save()
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/rest_framework/serializers.py", line 207, in save
Jun 17 14:27:46 services gunicorn[878]: self.instance = self.update(self.instance, validated_data)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/dynamic_preferences/api/serializers.py", line 69, in update
Jun 17 14:27:46 services gunicorn[878]: instance.value = validated_data['value']
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/dynamic_preferences/models.py", line 53, in set_value
Jun 17 14:27:46 services gunicorn[878]: self.raw_value = self.preference.serializer.serialize(value)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/virtualenv/lib/python3.8/site-packages/dynamic_preferences/serializers.py", line 39, in serialize
Jun 17 14:27:46 services gunicorn[878]: return cls.to_db(value, **kwargs)
Jun 17 14:27:46 services gunicorn[878]: File "/var/funkwhale/api/funkwhale_api/common/preferences.py", line 74, in to_db
Jun 17 14:27:46 services gunicorn[878]: raise cls.exception(
Jun 17 14:27:46 services gunicorn[878]: dynamic_preferences.serializers.SerializationError: {'help_text': {'text': None, 'content_type': 'text/markdown'}, 'fields': []} is not a valid value: {'help_text': {'text': [ErrorDetail(string='This field may not be null.', code='null')]}}