forked from University/epr24pr5-ojanssen2
Wrong Way boolean
This commit is contained in:
parent
037173106a
commit
c7ec2ea80d
1 changed files with 2 additions and 2 deletions
|
@ -236,7 +236,7 @@ namespace util
|
||||||
if (this->users.count(id) == 0)
|
if (this->users.count(id) == 0)
|
||||||
throw Error(401, "Eine solche BenutzerIn existiert nicht.");
|
throw Error(401, "Eine solche BenutzerIn existiert nicht.");
|
||||||
//Assigment
|
//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.");
|
throw Error(201, "Benutzer kann nicht gelöscht werden.");
|
||||||
}
|
}
|
||||||
this->users.erase(id);
|
this->users.erase(id);
|
||||||
|
@ -246,7 +246,7 @@ namespace util
|
||||||
{
|
{
|
||||||
if (this->tasks.count(id) == 0)
|
if (this->tasks.count(id) == 0)
|
||||||
throw Error(402, "Eine solche Aufgabe existiert nicht.");
|
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.");
|
throw Error(201, "Aufgabe kann nicht gelöscht werden.");
|
||||||
}
|
}
|
||||||
this->tasks.erase(id);
|
this->tasks.erase(id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue