minor change in Contract

This commit is contained in:
Frank Schubert
2022-06-21 12:28:54 +02:00
parent bedb7b577c
commit 17d7a9dc7b
2 changed files with 17 additions and 5 deletions

View File

@@ -61,7 +61,19 @@ class ContractController extends mfBaseController {
}
protected function editAction() {
$id = $this->request->id;
if(!is_numeric($id) || !$id) {
$this->layout()->setFlash("Vertrag nicht gefunden", "error");
$this->redirect("Contract");
}
$contract = new Contract($id);
if(!$contract->id) {
$this->layout()->setFlash("Vertrag nicht gefunden", "error");
$this->redirect("Contract");
}
$this->layout()->set("contract", $contract);
return $this->addAction();
}