Fix issues with inheritance
This commit is contained in:
@@ -281,7 +281,7 @@ class AggregatedAttribute(declared_attr):
|
|||||||
self.relationship = relationship
|
self.relationship = relationship
|
||||||
|
|
||||||
def __get__(desc, self, cls):
|
def __get__(desc, self, cls):
|
||||||
if not hasattr(cls, '__aggregates__'):
|
if '__aggregates__' not in cls.__dict__:
|
||||||
cls.__aggregates__ = {}
|
cls.__aggregates__ = {}
|
||||||
cls.__aggregates__[desc.fget.__name__] = {
|
cls.__aggregates__[desc.fget.__name__] = {
|
||||||
'expression': desc.fget,
|
'expression': desc.fget,
|
||||||
@@ -413,7 +413,7 @@ class AggregationManager(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def update_generator_registry(self, mapper, class_):
|
def update_generator_registry(self, mapper, class_):
|
||||||
if hasattr(class_, '__aggregates__'):
|
if '__aggregates__' in class_.__dict__:
|
||||||
for key, value in six.iteritems(class_.__aggregates__):
|
for key, value in six.iteritems(class_.__aggregates__):
|
||||||
relationships = []
|
relationships = []
|
||||||
rel_class = class_
|
rel_class = class_
|
||||||
|
Reference in New Issue
Block a user