We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 376d0fe commit e039b0bCopy full SHA for e039b0b
1 file changed
dojo/api_v2/serializers.py
@@ -1428,6 +1428,12 @@ def validate(self, data):
1428
msg = "Either engagement or product has to be set."
1429
raise serializers.ValidationError(msg)
1430
1431
+ if "custom_fields" in data and isinstance(data["custom_fields"], str):
1432
+ try:
1433
+ data["custom_fields"] = json.loads(data["custom_fields"])
1434
+ except json.JSONDecodeError as e:
1435
+ raise serializers.ValidationError({"custom_fields": f"Invalid JSON: {e}"}) from e
1436
+
1437
return data
1438
1439
0 commit comments