Commits

eurleif committed 30d18b0

In QuerySelectField, check if self.query is None rather than if it's false. That way, a list can be used as query.

  • Participants
  • Parent commits 07a2534

Comments (0)

Files changed (1)

File wtforms/ext/sqlalchemy/fields.py

 
     def _get_object_list(self):
         if self._object_list is None:
-            query = self.query or self.query_factory()
+            if self.query is None:
+                query = self.query_factory()
+            else:
+                query = self.query
             get_pk = self.get_pk
             self._object_list = list((unicode(get_pk(obj)), obj) for obj in query)
         return self._object_list