mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-11 10:00:48 -05:00
Resolve CodeQL warnings
This commit is contained in:
parent
e293d23ae3
commit
311c0ba4f1
@ -634,7 +634,10 @@ class UnifiedSearchViewSet(DocumentViewSet):
|
|||||||
except NotFound:
|
except NotFound:
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return HttpResponseBadRequest(str(e))
|
logger.warning(f"An error occurred listing search results: {str(e)}")
|
||||||
|
return HttpResponseBadRequest(
|
||||||
|
"Error listing search results, check logs for more detail.",
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
return super().list(request)
|
return super().list(request)
|
||||||
|
|
||||||
@ -702,7 +705,10 @@ class BulkEditView(GenericAPIView):
|
|||||||
result = method(documents, **parameters)
|
result = method(documents, **parameters)
|
||||||
return Response({"result": result})
|
return Response({"result": result})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return HttpResponseBadRequest(str(e))
|
logger.warning(f"An error occurred performing bulk edit: {str(e)}")
|
||||||
|
return HttpResponseBadRequest(
|
||||||
|
"Error performing bulk edit, check logs for more detail.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class PostDocumentView(GenericAPIView):
|
class PostDocumentView(GenericAPIView):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user