Commit c8bc55b3 authored by Michal Čihař's avatar Michal Čihař

Simplify condition

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent c951ba4d
......@@ -33,8 +33,7 @@ class SQLSum(BaseSQLSum):
'''
Adds type casting to boolean values for PostgreSQL.
'''
if (settings.DATABASES['default']['ENGINE']
== 'django.db.backends.postgresql_psycopg2'):
if 'psycopg2' in settings.DATABASES['default']['ENGINE']:
return '%(function)s(%(field)s::int)'
return '%(function)s(%(field)s)'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment