mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 18:26:00 +00:00
Removed type conversions where no longer needed
PHP 8.1 PDO SQLite now returns native data types
This commit is contained in:
@@ -53,7 +53,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
// TODO: This should be better done somehow in StockService
|
||||
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
|
||||
{
|
||||
$this->getStockService()->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id')));
|
||||
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
|
||||
}
|
||||
|
||||
return $this->ApiResponse($response, [
|
||||
@@ -167,7 +167,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
// TODO: This should be better done somehow in StockService
|
||||
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
|
||||
{
|
||||
$this->getStockService()->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id')));
|
||||
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
|
||||
}
|
||||
|
||||
return $this->EmptyApiResponse($response);
|
||||
|
Reference in New Issue
Block a user