Skip to content

Commit b801be3

Browse files
committed
Fix previous_role
1 parent e7454c8 commit b801be3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

back/database/manage_users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def update_user_role(self, user_id, role, previous_role=None):
199199
update_role = "UPDATE users SET role=? WHERE id=?"
200200
values = (role, user_id)
201201
if previous_role:
202-
if previous_role == 'temporary' and role == 'temporary':
202+
if previous_role == 'expired' and role == 'temporary':
203203
# Reset temporary account so that it keeps working for the next settings.temporary_user_duration
204204
update_role = "UPDATE users SET role=?,creation_datetime=? WHERE id=? AND role=?"
205205
now = datetime.datetime.utcnow()

last_release.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
* Dedicated error message when account is expired
2-
* Improve authentication checks
3-
* Ability to reset temporary account so that it stays temporary for longer
1+
* Fix previous_role

0 commit comments

Comments
 (0)