disnog / netranger-web

GNU Affero General Public License v3.0
2 stars 1 forks source link

User existing in DB but with no roles cannot complete /join #16

Closed jrokeach closed 3 years ago

jrokeach commented 3 years ago
[2021-01-28 12:54:20,917] ERROR in app: Exception on /join [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/src/app/nrweb/views.py", line 470, in join
    elif {"Member", "periphery"}.intersection(g.user["permanent_roles"]):
KeyError: 'permanent_roles'