Commit 41efdb32 authored by Francois Blackburn's avatar Francois Blackburn

trunk: rename relationship variables

reason: since we want to expose endpoint_* to the user, this change
avoid to convert name in confd
parent 4bfa3efa
......@@ -45,21 +45,21 @@ class TrunkFeatures(Base):
description = Column(Text)
context = Column(String(39))
sip_endpoint = relationship(UserSIP,
endpoint_sip = relationship(UserSIP,
primaryjoin="""and_(
TrunkFeatures.protocol == 'sip',
TrunkFeatures.protocolid == UserSIP.id
)""",
foreign_keys=[protocolid])
iax_endpoint = relationship(UserIAX,
endpoint_iax = relationship(UserIAX,
primaryjoin="""and_(
TrunkFeatures.protocol == 'iax',
TrunkFeatures.protocolid == UserIAX.id
)""",
foreign_keys=[protocolid])
custom_endpoint = relationship(UserCustom,
endpoint_custom = relationship(UserCustom,
primaryjoin="""and_(
TrunkFeatures.protocol == 'custom',
TrunkFeatures.protocolid == UserCustom.id
......
......@@ -39,9 +39,9 @@ class TrunkFixes(object):
UserSIP,
UserIAX,
UserCustom)
.outerjoin(TrunkFeatures.sip_endpoint)
.outerjoin(TrunkFeatures.iax_endpoint)
.outerjoin(TrunkFeatures.custom_endpoint)
.outerjoin(TrunkFeatures.endpoint_sip)
.outerjoin(TrunkFeatures.endpoint_iax)
.outerjoin(TrunkFeatures.endpoint_custom)
.options(
Load(TrunkFeatures).load_only("id", "context"),
Load(UserSIP).load_only("id", "category", "context"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment