mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-25 02:23:45 +03:00
Fix multiple model registration
This commit is contained in:
parent
1a3d512c57
commit
76b01c13de
|
@ -175,7 +175,8 @@ class ClickHouseSyncModel(DjangoModel):
|
||||||
|
|
||||||
def _on_commit():
|
def _on_commit():
|
||||||
for model_cls in cls.get_clickhouse_sync_models():
|
for model_cls in cls.get_clickhouse_sync_models():
|
||||||
storage.register_operations_wrapped(model_cls.get_import_key(), operation, *model_pks)
|
if model_cls.django_model == cls:
|
||||||
|
storage.register_operations_wrapped(model_cls.get_import_key(), operation, *model_pks)
|
||||||
|
|
||||||
if len(model_pks) > 0:
|
if len(model_pks) > 0:
|
||||||
storage = cls.get_clickhouse_storage()
|
storage = cls.get_clickhouse_storage()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user