Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Fix lower username on tg_user
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Jul 22, 2019
1 parent 06c8e4d commit 6b6eeb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
- New language: German
- New language: Turkish (Thanks to @cnpltdncsln)
- Users in polls are linked with telegram mentions
-

**Fixes:**
- Prevent usage of markdown characters in user input
Expand Down
3 changes: 2 additions & 1 deletion pollbot/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def get_or_create(session, tg_user):
raise e

# Allways update the username in case the username changed
user.username = tg_user.username.lower()
if tg_user.username is not None:
user.username = tg_user.username.lower()

# Allways update the name in case something changed
name = User.get_name_from_tg_user(tg_user)
Expand Down

0 comments on commit 6b6eeb0

Please sign in to comment.