From 437fae465df07bf09977bc1cba7810a8f8f62067 Mon Sep 17 00:00:00 2001 From: Nikolay Ogorov Date: Tue, 22 Dec 2020 18:35:44 +0300 Subject: [PATCH] Add exception type for try catch of api method --- netbox/users/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/users/api/views.py b/netbox/users/api/views.py index c337d71ba..52bdf9cba 100644 --- a/netbox/users/api/views.py +++ b/netbox/users/api/views.py @@ -80,7 +80,7 @@ class UserConfigViewSet(ViewSet): for item in request.data.items(): try: parsed_dict[item[0]] = json.loads(item[1]) - except: + except ValueErrror as e: parsed_dict[item[0]] = item[1] userconfig = self.get_queryset().first()