Bugfix in getting empty sync models

This commit is contained in:
M1ha 2019-01-09 15:36:56 +05:00
parent 682c004ba4
commit 33dea53aa2

View File

@ -161,7 +161,7 @@ class ClickHouseSyncModel(DjangoModel):
Returns all clickhouse models, listening to this class
:return: A set of model classes to sync
"""
return cls._clickhouse_sync_models
return getattr(cls, '_clickhouse_sync_models', set())
@classmethod
def register_clickhouse_operations(cls, operation, *model_pks, using=None):