Fix the link between objects and subjects.
This commit is contained in:
parent
f9b510a967
commit
51bca111c2
|
@ -140,13 +140,15 @@ class Item(TimeStampedModel):
|
|||
text = Column(UnicodeText)
|
||||
|
||||
subjects = relationship('Item',
|
||||
lazy='dynamic',
|
||||
secondary='reference',
|
||||
backref='object_item',
|
||||
foreign_keys=Reference.subject_id)
|
||||
primaryjoin=id == Reference.object_id,
|
||||
secondaryjoin=id == Reference.subject_id)
|
||||
objects = relationship('Item',
|
||||
lazy='dynamic',
|
||||
secondary='reference',
|
||||
backref='subject_item',
|
||||
foreign_keys=Reference.object_id)
|
||||
primaryjoin=id == Reference.subject_id,
|
||||
secondaryjoin=id == Reference.object_id)
|
||||
user = relationship('User', backref='items')
|
||||
|
||||
__mapper_args__ = {
|
||||
|
|
Loading…
Reference in a new issue