From 3ace5d3a0afd8a92f62d5b83bb4a58e028af1d92 Mon Sep 17 00:00:00 2001 From: Akiff Manji Date: Sat, 21 Sep 2024 14:49:54 -0700 Subject: [PATCH] refactor: do not attempt to convert the credential_id to an int Signed-off-by: Akiff Manji --- server/vcr-server/api/v4/views/rest/credential.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/server/vcr-server/api/v4/views/rest/credential.py b/server/vcr-server/api/v4/views/rest/credential.py index 125c15f7f..8c69ee8bc 100644 --- a/server/vcr-server/api/v4/views/rest/credential.py +++ b/server/vcr-server/api/v4/views/rest/credential.py @@ -25,11 +25,6 @@ def get_object(self): raise Http404() filter = {"credential_id": credential_id} - # If the input parameter is a pure int, treat as an internal database pk - try: - filter = {"pk": int(credential_id)} - except (ValueError, TypeError): - pass queryset = self.filter_queryset(self.get_queryset()) obj = get_object_or_404(queryset, **filter)