Incorrectly assumes models will have an id field

Bug #1267811 reported by Kevin McDermott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django-group-access
Fix Released
Undecided
Kevin McDermott

Bug Description

Should really access the pk instead...

  File "/home/kevin/src/canonical/offspring/upgrade-to-django15/.virtualenv/local/lib/python2.7/site-packages/django_group_access/models.py", line 161, in _get_accessible_by_user_filter_rules
    accessible_through_group.values('id')
  File "/home/kevin/src/canonical/offspring/upgrade-to-django15/.virtualenv/local/lib/python2.7/site-packages/django/db/models/query.py", line 623, in values
    return self._clone(klass=ValuesQuerySet, setup=True, _fields=fields)
  File "/home/kevin/src/canonical/offspring/upgrade-to-django15/.virtualenv/local/lib/python2.7/site-packages/django_group_access/__init__.py", line 122, in clone_queryset
    clone = func(self, *args, **kwargs)
  File "/home/kevin/src/canonical/offspring/upgrade-to-django15/.virtualenv/local/lib/python2.7/site-packages/django/db/models/query.py", line 930, in _clone
    c._setup_query()
  File "/home/kevin/src/canonical/offspring/upgrade-to-django15/.virtualenv/local/lib/python2.7/site-packages/django/db/models/query.py", line 1067, in _setup_query
    self.query.add_fields(self.field_names, True)
  File "/home/kevin/src/canonical/offspring/upgrade-to-django15/.virtualenv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1707, in add_fields
    "Choices are: %s" % (name, ", ".join(names)))
FieldError: Cannot resolve keyword 'id' into field. Choices are: access_groups, arch, buildrequest, buildresult, config_url, dailybuildorder, is_active, launchpad_project, name, notes, owner, priority, project_group, projectnotificationsubscription, series, status, suite, title

Related branches

Changed in django-group-access:
status: New → In Progress
assignee: nobody → Kevin McDermott (bigkevmcd)
Changed in django-group-access:
status: In Progress → Fix Committed
Changed in django-group-access:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.