Commits

Torsten Irländer  committed 927f63d

Fix building options.

  • Participants
  • Parent commits 3ccb1d3

Comments (0)

Files changed (1)

File formbar/form.py

         # Get mapped clazz for the field
         options = []
         if self.get_type() == 'manytoone':
-            options.append(("None", ""))
+            options.append(("None", "", True))
         clazz = self._get_sa_mapped_class()
         items = self._form._dbsession.query(clazz)
         for item in items:
                     options.append((item, item.id, True))
                 else:
                     options.append((item, item.id, False))
+            else:
+                options.append((item, item.id, True))
         return options
 
     def get_options(self):