Wrong Way boolean

This commit is contained in:
jbrass 2025-02-10 00:29:41 +01:00
parent 037173106a
commit c7ec2ea80d

View file

@ -236,7 +236,7 @@ namespace util
if (this->users.count(id) == 0)
throw Error(401, "Eine solche BenutzerIn existiert nicht.");
//Assigment
if (!this->get_assignments_for_user(id).empty()) {
if (this->get_assignments_for_user(id).empty()) {
throw Error(201, "Benutzer kann nicht gelöscht werden.");
}
this->users.erase(id);
@ -246,7 +246,7 @@ namespace util
{
if (this->tasks.count(id) == 0)
throw Error(402, "Eine solche Aufgabe existiert nicht.");
if (!this->get_assignments_for_task(id).empty()) {
if (this->get_assignments_for_task(id).empty()) {
throw Error(201, "Aufgabe kann nicht gelöscht werden.");
}
this->tasks.erase(id);