Commits

Luke Plant  committed ebbcee6

Fixed for postgres

  • Participants
  • Parent commits c6c327b
  • Tags release-0.1

Comments (0)

Files changed (1)

File django_easyfilters/queries.py

                 elif needs_string_cast:
                     vals = [typecast_timestamp(str(row[0])),
                             row[1]]
+                else:
+                    vals = row
                 yield vals
 
     def as_sql(self, qn=None):
-        sql = ('SELECT %s, COUNT(%s) FROM (%s) GROUP BY (%s) ORDER BY (%s)' % (
+        sql = ('SELECT %s, COUNT(%s) FROM (%s) subquery GROUP BY (%s) ORDER BY (%s)' % (
                 DateWithAlias.alias, DateWithAlias.alias, self.query.subquery,
                 DateWithAlias.alias, DateWithAlias.alias)
                )