[PR #15320] Update login.py #28300

Closed
opened 2026-02-21 20:43:11 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/15320

State: closed
Merged: Yes


Summary

If the user wanted to user ADMIN_API_KEY env variable, he would get this error:

 File "/app/api/libs/login.py", line 80, in decorated_view
    account = Account.query.filter_by(id=ta.account_id).first()
              ^^^^^^^^^^^^^
AttributeError: type object 'Account' has no attribute 'query'

This is probably due changes is more recent sqlalchemy. The proposed change fix this.

Fix https://github.com/langgenius/dify/issues/15332
Fix https://github.com/langgenius/dify/issues/14275
Fix https://github.com/langgenius/dify/issues/14233

**Original Pull Request:** https://github.com/langgenius/dify/pull/15320 **State:** closed **Merged:** Yes --- # Summary If the user wanted to user ADMIN_API_KEY env variable, he would get this error: ``` File "/app/api/libs/login.py", line 80, in decorated_view account = Account.query.filter_by(id=ta.account_id).first() ^^^^^^^^^^^^^ AttributeError: type object 'Account' has no attribute 'query' ``` This is probably due changes is more recent sqlalchemy. The proposed change fix this. Fix https://github.com/langgenius/dify/issues/15332 Fix https://github.com/langgenius/dify/issues/14275 Fix https://github.com/langgenius/dify/issues/14233
yindo added the pull-request label 2026-02-21 20:43:11 -05:00
yindo closed this issue 2026-02-21 20:43:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#28300