1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Miscellaneous RestrictedQuerySet cleanup

This commit is contained in:
Jeremy Stretch
2020-07-09 15:11:18 -04:00
parent 26e81546eb
commit 4f00b5af4a
8 changed files with 21 additions and 14 deletions

View File

@ -84,7 +84,7 @@ class PrefixViewSet(CustomFieldModelViewSet):
The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being
invoked in parallel, which results in a race condition where multiple insertions can occur.
"""
prefix = get_object_or_404(Prefix, pk=pk)
prefix = get_object_or_404(self.queryset, pk=pk)
available_prefixes = prefix.get_available_prefixes()
if request.method == 'POST':