Better error handling in group creation
This commit is contained in:
parent
d2239b8f16
commit
504294c893
1 changed files with 4 additions and 1 deletions
|
@ -40,7 +40,10 @@ class GroupCreate(validators.Schema):
|
||||||
validators.Regex(regex='^[a-z0-9\-]+$'),
|
validators.Regex(regex='^[a-z0-9\-]+$'),
|
||||||
)
|
)
|
||||||
display_name = validators.NotEmpty
|
display_name = validators.NotEmpty
|
||||||
owner = KnownUser
|
owner = validators.All(
|
||||||
|
KnownUser,
|
||||||
|
validators.NotEmpty,
|
||||||
|
)
|
||||||
prerequisite = KnownGroup
|
prerequisite = KnownGroup
|
||||||
#group_type = something
|
#group_type = something
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue