fix check for missing article

This commit is contained in:
CodeSteak 2020-06-13 11:54:25 +02:00
parent a664b42853
commit 7397698929
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public class SupplierOrderController {
final Article article = articleRepository.findArticleByArticleOffer(order.ordered).orElse(null);
if (order == null) {
if (article == null) {
model.addAttribute("error", "Der bestellte Artikel wurde nicht angelegt, er hätte nicht bestellt werden dürfen.");
response.setStatus(HttpServletResponse.SC_EXPECTATION_FAILED);
return listSuppliers(model);