mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Maybe make CodeQL happy about this exception handling
This commit is contained in:
		| @@ -56,9 +56,9 @@ class MatchingModelSerializer(serializers.ModelSerializer): | ||||
|         ): | ||||
|             try: | ||||
|                 re.compile(match) | ||||
|             except Exception as e: | ||||
|             except re.error as e: | ||||
|                 raise serializers.ValidationError( | ||||
|                     _("Invalid regular expression: %(error)s") % {"error": str(e)}, | ||||
|                     _("Invalid regular expression: %(error)s") % {"error": str(e.msg)}, | ||||
|                 ) | ||||
|         return match | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Trenton Holmes
					Trenton Holmes