mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Fix duplicate check for changing display names
This commit is contained in:
parent
7e20a09499
commit
8ef74deec1
@ -50,7 +50,7 @@ def handle_profile_edit(form, user, username):
|
||||
|
||||
if user.checkPerm(current_user, Permission.CHANGE_DISPLAY_NAME) and \
|
||||
user.display_name != form.display_name.data:
|
||||
if User.query.filter(id != user.id,
|
||||
if User.query.filter(User.id != user.id,
|
||||
or_(User.username == form.display_name.data,
|
||||
User.display_name.ilike(form.display_name.data))).count() > 0:
|
||||
flash("A user already has that name", "danger")
|
||||
|
Loading…
Reference in New Issue
Block a user