[pricelist] fixed set volumes

This commit is contained in:
Tim Gröger 2021-03-16 18:11:04 +01:00
parent e26b7b8c96
commit 0b60c27f32
1 changed files with 4 additions and 1 deletions

View File

@ -135,7 +135,10 @@ def set_volume(identifier, data):
if "id" in data:
data.pop("id")
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)
drink = get_drink(identifier)
if not drink: