from telemeta.models import Location
for f in args:
if f == 'apparent_collector':
- if not 'sqlite3' in engine and not 'postgresql_psycopg2':
+ if not 'sqlite3' in engine and not 'postgresql_psycopg2' in engine:
related.append('collection')
qs = qs.extra(select={f:
'IF(collector_from_collection, '
'media_items.collector)'})
elif f == 'country_or_continent':
related.append('location')
- if not 'sqlite3' in engine and not 'postgresql_psycopg2':
+ if not 'sqlite3' in engine and not 'postgresql_psycopg2' in engine:
qs = qs.extra(select={f:
'IF(locations.type = ' + str(Location.COUNTRY) + ' '
'OR locations.type = ' + str(Location.CONTINENT) + ','