Getting django.db.utils.DatabaseError: ORA-00918: column ambiguously defined error when I try to open Django admin page. Here is the error:
raise dj_exc_value.with_traceback(traceback) from exc_value File "/venomscribe/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) File "/venomscribe/lib/python3.6/site-packages/django/db/backends/oracle/base.py", line 514, in execute return self.cursor.execute(query, self._param_generator(params)) django.db.utils.DatabaseError: ORA-00918: column ambiguously defined
Query is
SELECT "DJANGO_ADMIN_LOG"."ID",
"DJANGO_ADMIN_LOG"."ACTION_TIME",
"DJANGO_ADMIN_LOG"."USER_ID",
"DJANGO_ADMIN_LOG"."CONTENT_TYPE_ID",
"DJANGO_ADMIN_LOG"."OBJECT_ID",
"DJANGO_ADMIN_LOG"."OBJECT_REPR",
"DJANGO_ADMIN_LOG"."ACTION_FLAG",
"DJANGO_ADMIN_LOG"."CHANGE_MESSAGE",
"AUTH_USER"."ID",
"AUTH_USER"."PASSWORD",
"AUTH_USER"."LAST_LOGIN",
"AUTH_USER"."IS_SUPERUSER",
"AUTH_USER"."USERNAME",
"AUTH_USER"."FIRST_NAME",
"AUTH_USER"."LAST_NAME",
"AUTH_USER"."EMAIL",
"AUTH_USER"."IS_STAFF",
"AUTH_USER"."IS_ACTIVE",
"AUTH_USER"."DATE_JOINED",
"DJANGO_CONTENT_TYPE"."ID",
"DJANGO_CONTENT_TYPE"."APP_LABEL",
"DJANGO_CONTENT_TYPE"."MODEL"
FROM "DJANGO_ADMIN_LOG"
INNER JOIN "AUTH_USER"
ON ("DJANGO_ADMIN_LOG"."USER_ID" = "AUTH_USER"."ID")
LEFT OUTER JOIN "DJANGO_CONTENT_TYPE"
ON ("DJANGO_ADMIN_LOG"."CONTENT_TYPE_ID" = "DJANGO_CONTENT_TYPE"."ID")
WHERE "DJANGO_ADMIN_LOG"."USER_ID" = :arg0
ORDER BY "DJANGO_ADMIN_LOG"."ACTION_TIME" DESC
FETCH FIRST 10 ROWS ONLY