[uihelper] Fix a possible NameError in meta_formconfig
could occur when using FormConfig with a custom uicfg object.
Closes #3802298.
--- a/web/uihelper.py Wed Nov 19 11:30:18 2014 +0100
+++ b/web/uihelper.py Sun May 04 22:29:20 2014 +0200
@@ -76,12 +76,9 @@
def __init__(cls, name, bases, classdict):
if cls.etype is None:
return
- if cls.uicfg_afs is None:
- uicfg_afs = uicfg.autoform_section
- if cls.uicfg_aff is None:
- uicfg_aff = uicfg.autoform_field
- if cls.uicfg_affk is None:
- uicfg_affk = uicfg.autoform_field_kwargs
+ uicfg_afs = cls.uicfg_afs or uicfg.autoform_section
+ uicfg_aff = cls.uicfg_aff or uicfg.autoform_field
+ uicfg_affk = cls.uicfg_affk or uicfg.autoform_field_kwargs
for attr_role in cls.hidden:
uicfg_afs.hide_field(cls.etype, attr_role, formtype=cls.formtype)
for attr_role in cls.rels_as_attrs: