mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 01:21:14 -06:00
Resolve CodeQL warning
This commit is contained in:
@@ -144,8 +144,9 @@ class MatchingModelSerializer(serializers.ModelSerializer):
|
||||
try:
|
||||
validate_regex_pattern(match)
|
||||
except ValueError as e:
|
||||
logger.debug(f"Invalid regular expression: {e!s}")
|
||||
raise serializers.ValidationError(
|
||||
_("Invalid regular expression: %(error)s") % {"error": str(e)},
|
||||
"Invalid regular expression, see log for details.",
|
||||
)
|
||||
return match
|
||||
|
||||
|
||||
Reference in New Issue
Block a user