mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-05 13:10:57 +00:00
Add more checks to pre-commit (#3132)
* Add bandit to pre-commit checks * fix catchall exceptions * remove unused definitons * remove unuseed ariables * Add docstring * fix B006, B008 errors * fix B007 error * ignore B009 * Add checks for formatting and naming
This commit is contained in:
@ -223,7 +223,7 @@ class BuildUnallocate(generics.CreateAPIView):
|
||||
|
||||
try:
|
||||
ctx['build'] = Build.objects.get(pk=self.kwargs.get('pk', None))
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
ctx['request'] = self.request
|
||||
@ -243,7 +243,7 @@ class BuildOrderContextMixin:
|
||||
|
||||
try:
|
||||
ctx['build'] = Build.objects.get(pk=self.kwargs.get('pk', None))
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return ctx
|
||||
|
Reference in New Issue
Block a user