phanikumv commented on code in PR #32177:
URL: https://github.com/apache/airflow/pull/32177#discussion_r1244613244
##########
airflow/utils/db.py:
##########
@@ -984,12 +986,11 @@ def check_username_duplicates(session: Session) ->
Iterable[str]:
for model in [User, RegisterUser]:
dups = []
try:
- dups = (
- session.query(model.username) # type: ignore[attr-defined]
+ dups = session.execute(
+ select(model.username) # type: ignore[attr-defined]
.group_by(model.username) # type: ignore[attr-defined]
.having(func.count() > 1)
- .all()
- )
+ ).all()
Review Comment:
same as above comment, planning to do the re-writing in another PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]