14
14
GROUP_NAME_MIN_LENGTH ,
15
15
)
16
16
from h .schemas import validators
17
- from h .schemas .base import CSRFSchema
18
17
from h .util import group_scope
19
18
20
19
_ = i18n .TranslationString
@@ -137,9 +136,9 @@ def group_organization_select_widget(_node, kwargs):
137
136
return SelectWidget (values = list (zip (org_pubids , org_labels , strict = False )))
138
137
139
138
140
- class AdminGroupSchema (CSRFSchema ):
139
+ class AdminGroupSchema (colander . Schema ):
141
140
def __init__ (self , * args ):
142
- super ().__init__ (validator = username_validator , * args ) # noqa: B026
141
+ super ().__init__ (* args )
143
142
144
143
group_type = colander .SchemaNode (
145
144
colander .String (),
@@ -207,7 +206,6 @@ def __init__(self, *args):
207
206
" of the entered scope strings (e.g. 'http://www.example.com')"
208
207
),
209
208
widget = SequenceWidget (add_subitem_text_template = _ ("Add scope" )),
210
- missing = colander .drop ,
211
209
)
212
210
213
211
members = colander .SequenceSchema (
@@ -218,3 +216,6 @@ def __init__(self, *args):
218
216
widget = SequenceWidget (add_subitem_text_template = _ ("Add member" )),
219
217
missing = None ,
220
218
)
219
+
220
+ def validator (self , node , value ):
221
+ username_validator (node , value )
0 commit comments