ThetaTau / CMT

App for the Theta Tau Chapter Management Tool
Other
10 stars 3 forks source link

TypeError: 'NoneType' object is not iterable #936

Closed VenturaFranklin closed 2 months ago

VenturaFranklin commented 9 months ago

View details in Rollbar: https://app.rollbar.com/a/frank.ventura/fix/item/CMT/564

Traceback (most recent call last):
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/braces/views/_access.py", line 107, in dispatch
    return super(LoginRequiredMixin, self).dispatch(
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/views/generic/list.py", line 142, in get
    self.object_list = self.get_queryset()
  File "/home/Venturafranklin/thetatauCMT/thetatauCMT/ballots/views.py", line 305, in get_queryset
    qs = Ballot.user_ballots(self.request.user)
  File "/home/Venturafranklin/thetatauCMT/thetatauCMT/ballots/models.py", line 124, in user_ballots
    chapter_officer = list(set(roles) & set(CHAPTER_OFFICER))
TypeError: 'NoneType' object is not iterable