laws-africa / indigo

Indigo Platform for publishing beautiful legislation.
https://laws.africa/indigo
Other
56 stars 25 forks source link

FieldError: Cannot resolve keyword 'number' into field. Choices are: action_object_actions, actor_actions, an... #2239

Open sentry-io[bot] opened 2 weeks ago

sentry-io[bot] commented 2 weeks ago

Sentry Issue: INDIGO-LAWSAFRICA-1WD

FieldError: Cannot resolve keyword 'number' into field. Choices are: action_object_actions, actor_actions, annotation, assigned_to, assigned_to_id, blocked_by, blocking, changes_requested, closed_at, code, country, country_id, created_at, created_by_user, created_by_user_id, description, document, document_id, extra_data, finished_by_user, finished_by_user_id, id, input_file, input_file_id, labels, locality, locality_id, output_file, output_file_id, reviewed_by_user, reviewed_by_user_id, state, submitted_by_user, submitted_by_user_id, target_actions, timeline_date, title, updated_at, updated_by_user, updated_by_user_id, work, work_id
(10 additional frame(s) were not displayed)
...
  File "indigo_app/views/tasks.py", line 86, in get_queryset
    return self.form.filter_queryset(self.get_base_queryset())
  File "indigo_app/forms/tasks.py", line 220, in filter_queryset
    queryset = queryset.order_by(self.cleaned_data['sortby'])
  File "django/db/models/query.py", line 1659, in order_by
    obj.query.add_ordering(*field_names)
  File "django/db/models/sql/query.py", line 2222, in add_ordering
    self.names_to_path(item.split(LOOKUP_SEP), self.model._meta)
  File "django/db/models/sql/query.py", line 1725, in names_to_path
    raise FieldError(

To reproduce:

These are fields on the Work, not the task