stages/prompt: fix error when both default and required are set
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4bd1cd127b
commit
83ac42ac43
|
@ -113,6 +113,9 @@ class Prompt(SerializerModel):
|
|||
kwargs["label"] = ""
|
||||
if default:
|
||||
kwargs["default"] = default
|
||||
# May not set both `required` and `default`
|
||||
if "default" in kwargs:
|
||||
kwargs.pop("required", None)
|
||||
return field_class(**kwargs)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
|
Reference in New Issue