Skip to content

Commit

Permalink
Restore single project ID filtering for AssetAdmin
Browse files Browse the repository at this point in the history
This relied on the permissions added by the default admin list filter interface. That changed from a single value to multiple, breaking the links we had on the item admin page.
  • Loading branch information
acdha committed Oct 25, 2019
1 parent 0113b63 commit e7acfb2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions concordia/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ def get_queryset(self, request):
qs = super().get_queryset(request)
return qs.select_related("item").order_by("item__item_id", "sequence")

def lookup_allowed(self, key, value):
if key in ("item__project__id__exact"):
return True
else:
return super().lookup_allowed(key, value)

def item_id(self, obj):
return obj.item.item_id

Expand Down

0 comments on commit e7acfb2

Please sign in to comment.