Bugfix for old django, expecting manager to be instance of models.Manager

This commit is contained in:
M1ha 2019-10-16 10:28:59 +05:00
parent 0751c67ce7
commit 4589230c97

View File

@ -7,6 +7,7 @@ from typing import Optional, Any, Type, Set
import six
from django.db import transaction
from django.db.models import Manager as DjangoManager
from django.db.models.manager import BaseManager
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
@ -116,7 +117,7 @@ qs_bases.append(DjangoQuerySet)
ClickHouseSyncQuerySet = type('ClickHouseSyncModelQuerySet', tuple(qs_bases), {})
class ClickHouseSyncManager(BaseManager.from_queryset(ClickHouseSyncQuerySet)):
class ClickHouseSyncManager(BaseManager.from_queryset(ClickHouseSyncQuerySet), DjangoManager):
pass