Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sentry-io bot opened this issue Sep 17, 2024 · 0 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Sep 17, 2024

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:

  • Go to any Tasks listing view
  • Sort by date or number

These are fields on the Work, not the task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants