diff --git a/pulpcore/app/serializers/base.py b/pulpcore/app/serializers/base.py index 16cc01e796..8eac0ebfc9 100644 --- a/pulpcore/app/serializers/base.py +++ b/pulpcore/app/serializers/base.py @@ -788,7 +788,7 @@ def to_internal_value(self, data): try: # Nested Serializers in from-urlencoded bodies are stringified as json by default. data = json.loads(data) - except json.DecodeError: + except json.JSONDecodeError: raise serializers.ValidationError( "Invalid json data for (nested) downloader config." )