Delay description association proxy construction
Association proxies cannot be constructed in the mixin because they will be shared between all models that inherit from it. This means they all share one and it will effectively be broken for all but the first to load it. This changes it to a declared attr like the others to make sure it's not constructed until each model inherits from it. Change-Id: I3e1aa21cd02c0f116cc6dee5e0577988ec37f767 Closes-Bug: #1553689
This commit is contained in:
parent
8a9b514c0a
commit
284f507ada
|
@ -138,4 +138,6 @@ class HasStandardAttributes(object):
|
|||
self.standard_attr = StandardAttribute(
|
||||
resource_type=self.__tablename__, description=description)
|
||||
|
||||
description = association_proxy('standard_attr', 'description')
|
||||
@declarative.declared_attr
|
||||
def description(cls):
|
||||
return association_proxy('standard_attr', 'description')
|
||||
|
|
Loading…
Reference in New Issue