🐛 — Fix bug in login view when having a cookie (internal server error)

This commit is contained in:
Luc Didry 2024-06-27 08:25:42 +02:00
parent 1c314c4460
commit 058622556d
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C
3 changed files with 6 additions and 4 deletions

View file

@ -2,6 +2,8 @@
## [Unreleased]
- 🐛 — Fix bug in login view when having a cookie (internal server error)
## 0.2.0
Date: 2024-06-24

View file

@ -30,7 +30,7 @@ SEVERITY_LEVELS = {"ok": 1, "warning": 2, "critical": 3, "unknown": 4}
async def login_view(request: Request, msg: str | None = None):
token = request.cookies.get("access-token")
if token is not None:
manager = get_manager(request)
manager = request.app.state.manager
user = await manager.get_current_user(token)
if user is not None:
return RedirectResponse(

View file

@ -24,13 +24,13 @@ git checkout main
make test
# Bump the version, according to semantic versionning
hatch version minor # or `hatch version major`
hatch version minor # or `hatch version major`, or `hatch version fix`
# Modify the changelog
editor CHANGELOG.md
# Commit the change
git add argos/__init__.py CHANGELOG
git add argos/__init__.py CHANGELOG.md
git commit -m "🏷 — Bump version ($(hatch version))"
# Create a tag on the git repository and push it
@ -45,7 +45,7 @@ hatch publish
Aditionnaly, ensure it works well in a new environment.
Then go to https://framagit.org/framasoft/framaspace/argos/-/releases to create a new release for the new tag.
Then go to <https://framagit.org/framasoft/framaspace/argos/-/releases> to create a new release for the new tag.
Use CHANGELOG.md content for that.
## Bumping the version number