Simple history ошибка при получение queryset User.history.all()

Я использую для отслеживании событий в проекте simple history, у меня есть основная модель class User (AbstractUser), я хотел отслеживать все изменение в модели, поэтому регистрировал модель User, она создает дополнительную таблицу, теперь все изменение записывается в таблице historicaluser в базе.

Теперь, когда я вызываю HistoryUser.objects.all(), получаю ошибку:

ОШИБКА:  таблица "core_user" отсутствует в предложении FROM
LINE 1: SELECT "core_user"."id", "core_user"."password", "core_user"...

SELECT "core_user"."id", "core_user"."password", "core_user"."last_login", '
'"core_user"."is_superuser", "core_user"."username", '
'"core_user"."first_name", "core_user"."last_name", "core_user"."email", '
'"core_user"."is_staff", "core_user"."is_active", "core_user"."date_joined", '
'"core_user"."editor_config", "dib_page_historicaluser"."ip_address", '
'"dib_page_historicaluser"."history_id", '
'"dib_page_historicaluser"."history_date", '
'"dib_page_historicaluser"."history_change_reason", '
'"dib_page_historicaluser"."history_type", '
'"dib_page_historicaluser"."history_user_id" FROM "dib_page_historicaluser" '
'ORDER BY "dib_page_historicaluser"."history_date" DESC, '
'"dib_page_historicaluser"."history_id" DESC LIMIT 21')

core_user — это моя основная таблица, dib_page_historicaluser — историческая модель.

Почему у меня такой запрос формируется?

Вернуться на верх