web/formfields.py
branchstable
changeset 8517 199fefe396ab
parent 8458 1c5f3c66ec53
child 8665 e65af61bde7d
--- a/web/formfields.py	Tue Aug 21 15:23:29 2012 +0200
+++ b/web/formfields.py	Wed Aug 22 14:17:22 2012 +0200
@@ -313,6 +313,7 @@
 
     def role_name(self):
         """return <field.name>-<field.role> if role is specified, else field.name"""
+        assert self.name, 'field without a name (give it to constructor for explicitly built fields)'
         if self.role is not None:
             return role_name(self.name, self.role)
         return self.name