pycroft icon indicating copy to clipboard operation
pycroft copied to clipboard

user_memberships_query sometimes returns [None]

Open agdsn-sentry[bot] opened this issue 2 years ago • 1 comments

Sentry Issue: PYCROFT-5N

ValidationError: 1 validation error for MembershipRow
denies.0
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.0.3/v/string_type
(2 additional frame(s) were not displayed)
...
  File "__init__.py", line 298, in error_router
    return original_handler(e)
  File "flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "web/blueprints/user/__init__.py", line 459, in user_show_groups_json
    items=[
  File "web/blueprints/user/__init__.py", line 460, in <listcomp>
    MembershipRow(

agdsn-sentry[bot] avatar Aug 02 '23 00:08 agdsn-sentry[bot]

f51c1fc was a workaround, the proper fix would fix the query (so that it does not return [None] when nothing is denied)

lukasjuhrich avatar Aug 02 '23 00:08 lukasjuhrich