Skip to content

Commit

Permalink
fix 2.0 sqla translation error
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Dec 18, 2023
1 parent 1520467 commit fe46bbe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pypnusershub/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,11 @@ def login():
app = db.session.get(models.Application, id_app)
if not app:
raise BadRequest(f"No app for id {id_app}")
user = (
user = db.session.execute(
sa.select(models.User)
.where(models.User.identifiant == login)
.where(models.User.filter_by_app())
.one()
)
).scalar_one()
user_dict = UserSchema(exclude=["remarques"]).dump(user)
except exc.NoResultFound as e:
msg = json.dumps(
Expand Down

0 comments on commit fe46bbe

Please sign in to comment.