mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix CodeQL warnings
This commit is contained in:
		| @@ -409,7 +409,10 @@ class DocumentViewSet( | ||||
|             try: | ||||
|                 return Response(self.getComments(doc)) | ||||
|             except Exception as e: | ||||
|                 return Response({"error": str(e)}) | ||||
|                 logger.warning(f"An error occurred retrieving comments: {str(e)}") | ||||
|                 return Response( | ||||
|                     {"error": "Error retreiving comments, check logs for more detail."}, | ||||
|                 ) | ||||
|         elif request.method == "POST": | ||||
|             try: | ||||
|                 c = Comment.objects.create( | ||||
| @@ -421,9 +424,10 @@ class DocumentViewSet( | ||||
|  | ||||
|                 return Response(self.getComments(doc)) | ||||
|             except Exception as e: | ||||
|                 logger.warning(f"An error occurred saving comment: {str(e)}") | ||||
|                 return Response( | ||||
|                     { | ||||
|                         "error": str(e), | ||||
|                         "error": "Error saving comment, check logs for more detail.", | ||||
|                     }, | ||||
|                 ) | ||||
|         elif request.method == "DELETE": | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon