preorder registration is accepted even with wrong unit data
This commit is contained in:
@@ -173,11 +173,10 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
|
||||
$sql = "SELECT * FROM view_wohneinheit WHERE 1=1 $where AND hausnummer_id=".$address->hausnummer_id;
|
||||
$res = $this->db()->query($sql);
|
||||
if(!$this->db()->num_rows($res)) {
|
||||
return mfResponse::NotFound(['message' => "Wohneinheit nicht gefunden"]);
|
||||
if($this->db()->num_rows($res)) {
|
||||
$unit = $this->db()->fetch_object($res);
|
||||
//return mfResponse::NotFound(['message' => "Wohneinheit nicht gefunden"]);
|
||||
}
|
||||
|
||||
$unit = $this->db()->fetch_object($res);
|
||||
//var_dump($this->db()->num_rows($res), $this->db()->fetch_object($res));
|
||||
} else {
|
||||
// if all unit values are empty try to find the unit with all empty values
|
||||
|
||||
Reference in New Issue
Block a user