Skip to content

As any user, I cannot select a preferred timezone #4351

Description

@joemull

Describe the bug
When I select a preferred timezone on my profile and save, I get an error:

During handling of the above exception (["Value 'Europe/Warsaw' is not a valid choice."]), another exception occurred:
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
    return view_func(request, *args, **kwargs)
  File "/home/joemull/git/janeway/src/core/views.py", line 503, in edit_profile
    if form.is_valid():
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/forms/forms.py", line 201, in is_valid
    return self.is_bound and not self.errors
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/forms/forms.py", line 196, in errors
    self.full_clean()
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/forms/forms.py", line 435, in full_clean
    self._post_clean()
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/forms/models.py", line 486, in _post_clean
    self.instance.full_clean(exclude=exclude, validate_unique=False)
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1470, in full_clean
    self.clean_fields(exclude=exclude)
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1522, in clean_fields
    setattr(self, f.attname, f.clean(raw_value, self))
  File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/db/models/fields/__init__.py", line 777, in clean
    self.validate(value, model_instance)
  File "/home/joemull/git/janeway/src/core/model_utils.py", line 634, in validate
    except exceptions.ValidationError as e:

Exception Type: NameError at /profile/
Exception Value: name 'exceptions' is not defined

Janeway version
v1.6.0-RC-2

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions