From ce70e816fefb54b5d22f2ad99bd5e47c986ebd46 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 1 Dec 2021 20:03:14 +0100 Subject: [PATCH] Improved other models --- src/gismo_data/model/server.py | 4 ++-- src/gismo_data/model/user.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gismo_data/model/server.py b/src/gismo_data/model/server.py index 207bc35..5f9e9e5 100644 --- a/src/gismo_data/model/server.py +++ b/src/gismo_data/model/server.py @@ -72,12 +72,12 @@ class Server(TableABC): UPDATE `Servers` SET `DiscordServerId` = {self._discord_server_id}, `LastModifiedAt` = '{self._modified_at}' - WHERE `Id` = {self._id}; + WHERE `Id` = {self._server_id}; """) @property def delete_string(self) -> str: return str(f""" DELETE FROM `Servers` - WHERE `Id` = {self._id}; + WHERE `Id` = {self._server_id}; """) diff --git a/src/gismo_data/model/user.py b/src/gismo_data/model/user.py index 3bbc27a..2fae830 100644 --- a/src/gismo_data/model/user.py +++ b/src/gismo_data/model/user.py @@ -93,12 +93,12 @@ class User(TableABC): UPDATE `Users` SET `XP` = {self._xp}, `LastModifiedAt` = '{self._modified_at}' - WHERE `Id` = {self._id}; + WHERE `Id` = {self._user_id}; """) @property def delete_string(self) -> str: return str(f""" DELETE FROM `Users` - WHERE `Id` = {self._id}; + WHERE `Id` = {self._user_id}; """)