Dirty fixing of some more mariadb -> mysql-connector issues....

TODO: do it properly.
This commit is contained in:
Cedric
2023-08-08 14:07:36 +02:00
parent 7f55828c5f
commit bdc826c15b
8 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ class MailController:
readers.append(DictObject({"name": user.name, "char_id": user.char_id}))
with self.db.pool.get_connection() as conn:
with conn.cursor() as cur:
cur.executemany("INSERT INTO mail(sender, recipient, text, sent_at) VALUES(?, ?, ?, ?)", mails)
cur.executemany("INSERT INTO mail(sender, recipient, text, sent_at) VALUES(?, ?, ?, ?)".replace("?", "%s"), mails)
for user in readers:
self.send_mail(0, user.char_id, self.get_mails(user.char_id),
greeting=f"<highlight>{sender.sender.name}</highlight> just sent you a group mail, "