# HG changeset patch # User Sylvain Thénault # Date 1260287216 -3600 # Node ID 3876c894e0181a316626c4507219be16d97098fe # Parent 39ae94e0c8b835b8af566a7cd7c721ae678194ee card referenced later diff -r 39ae94e0c8b8 -r 3876c894e018 web/formfields.py --- a/web/formfields.py Tue Dec 08 16:45:01 2009 +0100 +++ b/web/formfields.py Tue Dec 08 16:46:56 2009 +0100 @@ -594,7 +594,8 @@ kwargs.setdefault('initial', get_default) else: targetschema = rdef.subject - kwargs['required'] = rdef.role_cardinality(role) in '1+' + card = rdef.role_cardinality(role) + kwargs['required'] = card in '1+' kwargs['name'] = rschema.type if role == 'object': kwargs.setdefault('label', (eschema.type, rschema.type + '_object'))