mirror of https://github.com/kcal-app/kcal.git
Allow null value for recipe volume
This commit is contained in:
parent
ef719c9175
commit
f6fa2cf79f
|
@ -201,11 +201,14 @@ class RecipeController extends Controller
|
|||
'description_delta' => $input['description_delta'],
|
||||
'servings' => (int) $input['servings'],
|
||||
'weight' => $input['weight'],
|
||||
'volume' => Number::floatFromString($input['volume']),
|
||||
'volume' => $input['volume'],
|
||||
'time_prep' => (int) $input['time_prep'],
|
||||
'time_cook' => (int) $input['time_cook'],
|
||||
'source' => $input['source'],
|
||||
]);
|
||||
if (!empty($input['volume'])) {
|
||||
$recipe->volume = Number::floatFromString($input['volume']);
|
||||
}
|
||||
|
||||
try {
|
||||
DB::transaction(function () use ($input, $recipe, $request) {
|
||||
|
|
Loading…
Reference in New Issue