fix(models): disambiguate repair estimate user relationships
This commit is contained in:
parent
46eeaa1f2e
commit
7835d3ca75
4 changed files with 31 additions and 5 deletions
|
|
@ -103,7 +103,11 @@ class InventoryStockMovement(Base):
|
|||
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
|
||||
|
||||
item: Mapped[InventoryItem] = relationship(back_populates="movements")
|
||||
actor = relationship("User", lazy="joined")
|
||||
actor = relationship(
|
||||
"User",
|
||||
foreign_keys="InventoryStockMovement.actor_user_id",
|
||||
lazy="joined",
|
||||
)
|
||||
|
||||
@property
|
||||
def actor_username(self) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue