[pricelist] fixed set volumes
This commit is contained in:
parent
e26b7b8c96
commit
0b60c27f32
|
@ -135,7 +135,10 @@ def set_volume(identifier, data):
|
||||||
if "id" in data:
|
if "id" in data:
|
||||||
data.pop("id")
|
data.pop("id")
|
||||||
values = {key: value for key, value in data.items() if key in allowed_keys}
|
values = {key: value for key, value in data.items() if key in allowed_keys}
|
||||||
|
if "prices" in values:
|
||||||
|
prices = values.pop("prices")
|
||||||
|
if "ingredients" in values:
|
||||||
|
ingredients = values.pop("ingredients")
|
||||||
volume = DrinkPriceVolume(**values)
|
volume = DrinkPriceVolume(**values)
|
||||||
drink = get_drink(identifier)
|
drink = get_drink(identifier)
|
||||||
if not drink:
|
if not drink:
|
||||||
|
|
Loading…
Reference in New Issue