Skip to content

Commit e3372b5

Browse files
authored
tuple error patch
tuple is not supported to insert (at least in this way) into a text field
1 parent 5bf96ef commit e3372b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

SiteAlert_bot.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,12 @@ def registered(m):
144144
credentials = site_alert.execute_fetch_all("SELECT mail FROM Users WHERE telegram =?", (m.chat.id,))
145145
if len(credentials) > 0:
146146
mymsg = "You have registered this e-mail: " + credentials[0] + "\nYour notification status is:\nE-mail: "
147-
status = site_alert.execute_fetch_all("SELECT mailnotification FROM Users WHERE mail = ?", (credentials[0],))[
148-
0]
147+
status = site_alert.execute_fetch_all("SELECT mailnotification FROM Users WHERE mail = ?", (credentials[0]))[0]
149148
mymsg += status[0] + "\nTelegram: "
150149
status = \
151-
site_alert.execute_fetch_all("SELECT telegramnotification FROM Users WHERE mail = ?", (credentials[0],))[0]
150+
site_alert.execute_fetch_all("SELECT telegramnotification FROM Users WHERE mail = ?", (credentials[0]))[0]
152151
mymsg += status[0] + "\nYou are registered to:"
153-
for site in site_alert.execute_fetch_all("SELECT name FROM Registered WHERE mail = ?", (credentials[0],)):
152+
for site in site_alert.execute_fetch_all("SELECT name FROM Registered WHERE mail = ?", (credentials[0])):
154153
mymsg = mymsg + "\n" + str(i) + ") " + site[0]
155154
i += 1
156155
tb.send_message(m.chat.id, mymsg)

0 commit comments

Comments
 (0)