Fixed db null handling #219 #229
No reviewers
Labels
No Label
MVP
web-interface
bug
bugfix
cli
discussion
documentation
duplicate
expense
high
expense
low
expense
medium
expense
very-high
help wanted
improvement
invalid
priority
blocker
priority
high
priority
low
priority
medium
question
refactoring
release
story
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sh-edraft.de/sh_discord_bot#229
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "#219"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -132,4 +117,4 @@
def udpate_string(self) -> str:
return str(
f"""
UPDATE `UserJoinedGameServer`
Wie wäre es hier mit:
Somit wäre das SQL-Statement besser wartbar, sollte neue Variablen dazu kommen, welche Nullwerte beinhalten könnten.
@ -132,3 +118,2 @@
UPDATE `UserJoinedServers`
SET `LeavedOn` = '{self._leaved_on}',
`LastModifiedAt` = '{self._modified_at}'
{"" if self._leaved_on is None else f"SET `LeavedOn` = '{self._leaved_on}',"}
Auch hier das SQL-Statement so implementieren für bessere Wartbarkeit.
@ -142,3 +127,2 @@
UPDATE `UserJoinedVoiceChannel`
SET `LeavedOn` = '{self._leaved_on}',
`LastModifiedAt` = '{self._modified_at}'
{"" if self._leaved_on is None else f"SET `LeavedOn` = '{self._leaved_on}',"}
Auch hier das SQL-Statement so implementieren für bessere Wartbarkeit.
@ -134,3 +119,3 @@
f"""
UPDATE `UserJoinedGameServer`
SET `LeavedOn` = '{self._leaved_on}',
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
Wenn
self._leaved_on
nicht none ist, käme es hier nicht zum folgenden SQL-Statement:Welches durch das fehlende
SET
nicht ausgeführt werden kann?@ -131,3 +117,3 @@
f"""
UPDATE `UserJoinedServers`
SET `LeavedOn` = '{self._leaved_on}',
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
Auch hier das SET-Problem
@ -141,3 +126,3 @@
f"""
UPDATE `UserJoinedVoiceChannel`
SET `LeavedOn` = '{self._leaved_on}',
{"SET " if self._leaved_on is None else f"`LeavedOn` = '{self._leaved_on}',"}
Auch hier das SET-Problem