mirror of
https://github.com/grocy/grocy.git
synced 2025-08-13 09:17:26 +00:00
Some bug fixes. (#959)
* Fixes #956. Return 404 for missing objects in GenericEntityApiController.php * Fixes #936 and #943. Include Products that expire today in /stock/volatile and "Expiring soon"-sum on stockoverview * Fixes #881. Remove items of deleted shopping lists. * Fixes #875. Prevent infinite nested recipes. * Review Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
committed by
GitHub
parent
cf9bb87f6e
commit
923e027a4b
@@ -50,6 +50,10 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
|
||||
$object = $this->getDatabase()->{$args['entity']}($args['objectId']);
|
||||
if ($object == null) {
|
||||
return $this->GenericErrorResponse($response, 'Object not found', 404);
|
||||
}
|
||||
|
||||
$object['userfields'] = $userfields;
|
||||
|
||||
return $this->ApiResponse($response, $object);
|
||||
|
Reference in New Issue
Block a user