diff --git a/application/Api/v1/PreorderApicontroller.php b/application/Api/v1/PreorderApicontroller.php index d1674ce3e..f21e991e6 100644 --- a/application/Api/v1/PreorderApicontroller.php +++ b/application/Api/v1/PreorderApicontroller.php @@ -346,7 +346,7 @@ class PreorderApicontroller extends mfBaseApicontroller { * check if there is an existing preorder for this unit already */ if($unit && $unit->wohneinheit_id) { - $existing_preorder = PreorderModel::getFirst(['adb_wohneinheit_id' => $unit->wohneinheit_id]); + $existing_preorder = PreorderModel::getFirst(['adb_wohneinheit_id' => $unit->wohneinheit_id, 'deleted' => 0]); if($existing_preorder) { return mfResponse::Forbidden(['message' => "Für diese Wohneinheit liegt bereits eine Bestellung vor"]); }