introduce extra var bc can't write to private attribute
This commit is contained in:
parent
f274d25822
commit
268b9748c3
|
@ -46,12 +46,12 @@ class TelegramBot(Bot):
|
||||||
# TODO: /help message should be set in frontend
|
# TODO: /help message should be set in frontend
|
||||||
else:
|
else:
|
||||||
# set report.author to "" to avoid mailbot crash
|
# set report.author to "" to avoid mailbot crash
|
||||||
if update.message.sender.username is None:
|
sender_name = update.message.sender.username
|
||||||
update.message.sender.username = ""
|
if sender_name is None:
|
||||||
|
sender_name = ""
|
||||||
|
|
||||||
reports.append(Report(update.message.sender.username, self,
|
reports.append(Report(sender_name, self, update.message.text,
|
||||||
update.message.text, None,
|
None, update.message.date))
|
||||||
update.message.date))
|
|
||||||
return reports
|
return reports
|
||||||
|
|
||||||
def post(self, user, report):
|
def post(self, user, report):
|
||||||
|
|
Loading…
Reference in a new issue