tdfischer / organizer

The answer is to get organized.
GNU Affero General Public License v3.0
17 stars 5 forks source link

IndexError: list index out of range #109

Closed tdfischer closed 5 years ago

tdfischer commented 5 years ago

https://sentry.io/east-bay-for-everyone/ebf-organizer/issues/725810461/

IndexError: list index out of range
(12 additional frame(s) were not displayed)
...
  File "rest_framework/serializers.py", line 488, in to_representation
    attribute = field.get_attribute(instance)
  File "rest_framework/fields.py", line 445, in get_attribute
    return get_attribute(instance, self.source_attrs)
  File "rest_framework/fields.py", line 104, in get_attribute
    instance = getattr(instance, attr)
  File "crm/models.py", line 51, in geo
    if self.current_turf is not None:
  File "crm/models.py", line 96, in current_turf
    return self.turf_memberships.order_by('-joined_on')[0].turf

IndexError: list index out of range