Code

Do not create bogus non-anonymous objects.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 24 Nov 2009 20:39:51 +0000 (20:39 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 24 Nov 2009 20:39:51 +0000 (20:39 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4390 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/templating.py

index b46f9d61b356b35e47a9858f103f15c0abb82d80..4c7b2c914b1002be9edd891ed200b9cf90392e5a 100644 (file)
@@ -1240,7 +1240,12 @@ class HTMLProperty(HTMLInputMixin, HTMLPermissions):
         self._anonymous = anonymous
         self._name = name
         if not anonymous:
-            self._formname = '%s%s@%s'%(classname, nodeid, name)
+            if nodeid:
+                self._formname = '%s%s@%s'%(classname, nodeid, name)
+            else:
+                # This case occurs when creating a property for a
+                # non-anonymous class.
+                self._formname = '%s@%s'%(classname, name)
         else:
             self._formname = name