From 5add74cc396a0289d962c56ae5459e0e14ecf990 Mon Sep 17 00:00:00 2001 From: M1ha Date: Fri, 23 Nov 2018 12:05:16 +0500 Subject: [PATCH] Bugfix --- src/django_clickhouse/clickhouse_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/django_clickhouse/clickhouse_models.py b/src/django_clickhouse/clickhouse_models.py index 3a3ddd8..c409c35 100644 --- a/src/django_clickhouse/clickhouse_models.py +++ b/src/django_clickhouse/clickhouse_models.py @@ -63,7 +63,7 @@ class ClickHouseModel(with_metaclass(ClickHouseModelMeta, InfiModel)): if for_write: return db_router.db_for_write(cls) else: - return db_router.db_for_read(self) + return db_router.db_for_read(cls) @classmethod def get_django_model_serializer(cls, writable=False): # type: (bool) -> Django2ClickHouseModelSerializer