Projekt_Si/classes/data/logic_test.py

15 lines
522 B
Python

def diet_restriction(meals,client):
for meal in meals:
vegan,vegetarian,meat = meal.vegan_vegetarian_meat
print(meal)
print(client.restrykcje_dietowe)
if vegan and client.restrykcje_dietowe == 'Vegan':
return True
elif vegetarian and (client.restrykcje_dietowe == 'Vegetarian' or meat and client.restrykcje_dietowe == 'Vegan'):
return True
elif client.restrykcje_dietowe == 'Meat':
return True
else:
return False