core: add notice about duplicate keys
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
30033d1f90
commit
bd92505bc2
|
@ -14,7 +14,7 @@ def is_dict(value: Any):
|
|||
"""Ensure a value is a dictionary, useful for JSONFields"""
|
||||
if isinstance(value, dict):
|
||||
return
|
||||
raise ValidationError("Value must be a dictionary.")
|
||||
raise ValidationError("Value must be a dictionary, and not have any duplicate keys.")
|
||||
|
||||
|
||||
class PassiveSerializer(Serializer):
|
||||
|
|
|
@ -51,7 +51,7 @@ class OutpostSerializer(ModelSerializer):
|
|||
raise ValidationError(
|
||||
(
|
||||
f"Outpost type {self.initial_data['type']} can't be used with "
|
||||
f"{type(provider)} providers."
|
||||
f"{provider.__class__.__name} providers."
|
||||
)
|
||||
)
|
||||
return providers
|
||||
|
|
Reference in New Issue