mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-22 00:56:34 +03:00
Fixed bug in final() method engine validation
This commit is contained in:
parent
7f38f8c654
commit
76dfdb6012
|
@ -1,4 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import six
|
||||
import pytz
|
||||
from copy import copy
|
||||
|
@ -408,7 +409,7 @@ class QuerySet(object):
|
|||
Adds a FINAL modifier to table, meaning data will be collapsed to final version.
|
||||
Can be used with CollapsingMergeTree engine only
|
||||
"""
|
||||
if not issubclass(self._model_cls, CollapsingMergeTree):
|
||||
if not isinstance(self._model_cls.engine, CollapsingMergeTree):
|
||||
raise TypeError('final() method can be used only with CollapsingMergeTree engine')
|
||||
|
||||
qs = copy(self)
|
||||
|
|
|
@ -419,7 +419,7 @@ class SampleModel(Model):
|
|||
|
||||
class SampleCollapsingModel(SampleModel):
|
||||
|
||||
sign = UInt8Field(default=1)
|
||||
sign = Int8Field(default=1)
|
||||
|
||||
engine = CollapsingMergeTree('materialized_date', ('num',), 'sign')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user