Fix day and hour datepart

This commit is contained in:
2014-11-25 22:42:50 +01:00
parent 1ba410a78f
commit 5b731fb595

View File

@@ -138,7 +138,7 @@ class Q(QMixin):
op = "NOT "
return "{0} is {1}NULL".format(column, op)
if lookup in ['year', 'month', 'day' 'hour', 'minute', 'second']:
if lookup in ['year', 'month', 'day', 'hour', 'minute', 'second']:
if arr:
column = "DATEPART('{0}', {1})__{2}".format(lookup, column, arr.pop(0))
return self._process(column, value)