Fixed test mail & delete auth user

This commit is contained in:
Sven Heidemann 2024-01-26 14:03:47 +01:00
parent 8cd5a0d040
commit a24fefd3e2
3 changed files with 11 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"api": {
"api": {
"test_mail": {
"message": "Dies ist eine Test-Mail vom Krümelmonster Web Interface\nGesendet von {}-{}",
"message": "Dies ist eine Test-Mail vom Kruemelmonster Web Interface\r\nGesendet von {}-{}",
"subject": "Krümelmonster Web Interface Test-Mail"
}
},

View File

@ -258,6 +258,15 @@ class AuthUser(TableABC):
"""
)
@property
def delete_relations_string(self) -> str:
return str(
f"""
DELETE FROM `AuthUserUsersRelations`
WHERE `AuthUserId` = {self._auth_user_id};
"""
)
@property
def delete_string(self) -> str:
return str(

View File

@ -164,6 +164,7 @@ class AuthUserRepositoryService(AuthUserRepositoryABC):
def delete_auth_user(self, user: AuthUser):
self._logger.trace(__name__, f"Send SQL command: {user.delete_string}")
self._context.cursor.execute(user.delete_relations_string)
self._context.cursor.execute(user.delete_string)
def add_auth_user_user_rel(self, rel: AuthUserUsersRelation):