From 41eb6e46ee2668358527fb0525bb10223c368e3e Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Sat, 17 Dec 2022 23:14:12 +0100 Subject: [PATCH] Added one more type check for HoloUser init --- classes/holo_user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/holo_user.py b/classes/holo_user.py index 474d1ec..4c4c03c 100644 --- a/classes/holo_user.py +++ b/classes/holo_user.py @@ -100,10 +100,10 @@ class HoloUser(): self.locale = holo_user["tg_locale"] self.username = holo_user["tg_username"] - if isinstance(user, User) and ((self.name != user.first_name) and (user.first_name is None)): + if isinstance(user, User) and ((self.name != user.first_name) and (user.first_name is not None)): self.set("tg_name", user.first_name) - if isinstance(user, User) and (self.phone != user.phone_number): + if isinstance(user, User) and ((self.phone != user.phone_number) and (user.phone_number is not None)): self.set("tg_phone", user.phone_number) if isinstance(user, User) and ((self.locale != user.language_code) and (user.language_code is not None)):