Skip to content

Commit

Permalink
fix retrieve, update, delete causing not found issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Nov 29, 2024
1 parent ffe864b commit 1ae2087
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions camera/api/viewsets/position_preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def get_queryset(self):
if bed_external_id:
return queryset.filter(asset_bed__bed=self.get_bed_obj(bed_external_id))

if self.kwargs.get("external_id"):
return queryset.filter(external_id=self.kwargs.get("external_id"))

raise NotFound

def get_serializer_context(self):
Expand Down

0 comments on commit 1ae2087

Please sign in to comment.