ThetaTau / CMT

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

FieldError: Cannot resolve keyword 'current_status' into field. Choices are: address, address_changed, address_id, altered, alternate, audit_form, badge_number, ballots, birth_date, chapter, chapter_form, chapter_id, charter, collection, collectionreferra #722

Closed VenturaFranklin closed 2 years ago

VenturaFranklin commented 2 years ago

View details in Rollbar: https://rollbar.com/frank.ventura/CMT/items/442/

Traceback (most recent call last):
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, 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 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/braces/views/_access.py", line 97, in dispatch
    return super(LoginRequiredMixin, self).dispatch(
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/braces/views/_access.py", line 346, in dispatch
    return super(GroupRequiredMixin, self).dispatch(
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/Venturafranklin/thetatauCMT/thetatauCMT/regions/views.py", line 39, in get
    context = self.get_context_data(object=kwargs["slug"])
  File "/home/Venturafranklin/thetatauCMT/thetatauCMT/regions/views.py", line 100, in get_context_data
    [x[0] for x in self.filter.qs.values_list("email").distinct()]
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django_filters/filterset.py", line 243, in qs
    qs = self.filter_queryset(qs)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django_filters/filterset.py", line 230, in filter_queryset
    queryset = self.filters[name].filter(queryset, value)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django_filters/filters.py", line 779, in __call__
    return self.method(qs, self.f.field_name, value)
  File "/home/Venturafranklin/thetatauCMT/thetatauCMT/users/filters.py", line 94, in filter_current_status
    queryset = queryset.filter(current_status=value)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/db/models/query.py", line 892, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/db/models/query.py", line 910, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1290, in add_q
    clause, _ = self._add_q(q_object, self.used_aliases)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1315, in _add_q
    child_clause, needed_inner = self.build_filter(
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1190, in build_filter
    lookups, parts, reffed_expression = self.solve_lookup_type(arg)
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1049, in solve_lookup_type
    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
  File "/home/Venturafranklin/.virtualenvs/thetatauCMT/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1419, in names_to_path
    raise FieldError("Cannot resolve keyword '%s' into field. "
FieldError: Cannot resolve keyword 'current_status' into field. Choices are: address, address_changed, address_id, altered, alternate, audit_form, badge_number, ballots, birth_date, chapter, chapter_form, chapter_id, charter, collection, collectionreferral, conv_off1, conv_off2, date_joined, deceased, deceased_changed, deceased_date, degree, delegate, demographic, depledge, depledge_survey, discipline, email, email_school, emailaddress, emergency_first_name, emergency_last_name, emergency_middle_name, emergency_nickname, emergency_phone_number, emergency_relation, employer, employer_address, employer_address_id, employer_changed, employer_position, first_name, gear_articles, gpas, graduation_year, groups, id, initiation, is_active, is_staff, is_superuser, last_login, last_name, logentry, maiden_name, major, major_id, middle_name, modified, name, nickname, no_contact, notes, notes_created_chapter, notes_created_user, notes_modified_chapter, notes_modified_user, orgs, osm, osm_off1, osm_off2, password, phone_number, pledge_form, prealumn_form, preferred_name, regional_director, report, report_modified_set, report_starred_set, resign_off1, resign_off2, resignation, return_form, risk_form, roles, sentnotification, service_hours, socialaccount, staticdevice, status, status_changes, submissions, suffix, task, termsandconditions, title, totpdevice, user_id, user_permissions, username, usernotification, userterms
VenturaFranklin commented 2 years ago

There are no members in the National region and so the query does not get annotated with the "current_status" keyword causing the filter to fail