Skip to content

Commit

Permalink
fix lot trade and up benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
cayop committed Feb 9, 2024
1 parent 8e670a0 commit 3e0d328
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ereuse_devicehub/resources/action/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ class Trade(JoinedTableMixin, ActionWithMultipleTradeDocuments):
)
lot = relationship(
'Lot',
backref=backref('trade', lazy=True, uselist=False, cascade=CASCADE_OWN),
backref=backref('trade', lazy=False, uselist=False, cascade=CASCADE_OWN),
primaryjoin='Trade.lot_id == Lot.id',
)

Expand Down
6 changes: 3 additions & 3 deletions ereuse_devicehub/resources/device/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ class Placeholder(Thing):
device = db.relationship(
Device,
backref=backref(
'placeholder', lazy=True, cascade="all, delete-orphan", uselist=False
'placeholder', lazy=False, cascade="all, delete-orphan", uselist=False
),
primaryjoin=device_id == Device.id,
)
Expand All @@ -1304,7 +1304,7 @@ class Placeholder(Thing):
)
binding = db.relationship(
Device,
backref=backref('binding', lazy=True, uselist=False),
backref=backref('binding', lazy=False, uselist=False),
primaryjoin=binding_id == Device.id,
)
binding_id.comment = "binding placeholder with workbench device"
Expand Down Expand Up @@ -1695,7 +1695,7 @@ class Component(Device):
Computer,
backref=backref(
'components',
lazy=True,
lazy=False,
cascade=CASCADE_DEL,
order_by=lambda: Component.id,
collection_class=OrderedSet,
Expand Down

0 comments on commit 3e0d328

Please sign in to comment.