Allow filtering feeds by bundle (#1152)

This commit is contained in:
Sascha Ißbrücker
2025-08-10 12:59:55 +02:00
committed by GitHub
parent 846808d870
commit 5cc8c9c010
3 changed files with 59 additions and 1 deletions

View File

@@ -32,10 +32,14 @@ def bookmark_write(request: HttpRequest, bookmark_id: int | str):
raise Http404("Bookmark does not exist")
def bundle_read(request: HttpRequest, bundle_id: int | str):
return bundle_write(request, bundle_id)
def bundle_write(request: HttpRequest, bundle_id: int | str):
try:
return BookmarkBundle.objects.get(pk=bundle_id, owner=request.user)
except BookmarkBundle.DoesNotExist:
except (BookmarkBundle.DoesNotExist, ValueError):
raise Http404("Bundle does not exist")