mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(models): remove the unread App.author_name db.session wrapper (#41983)
This commit is contained in:
1 parent
8a69aa2884
commit
e65f45f17a
1 file changed
-4
@@ -703,10 +703,6 @@ class App(Base):
|
||||
|
||||
return tags or []
|
||||
|
||||
@property
|
||||
def author_name(self) -> str | None:
|
||||
return self.author_name_with_session(session=db.session())
|
||||
|
||||
def author_name_with_session(self, *, session: Session) -> str | None:
|
||||
if self.created_by:
|
||||
account = session.scalar(select(Account).where(Account.id == self.created_by))
|
||||
|
||||
Reference in new issue
Block a user