예제 #1
0
    def save_match(self, item: Recipe, style: Style):
        if not self.is_within_limits('abv', item, style):
            style = None
        elif not self.is_within_limits('ibu', item, style):
            style = None
        elif not self.is_within_limits('srm', item, style):
            style = None

        item.style = style
        item.save()
예제 #2
0
 def save_match(self, item: Recipe, match: Style):
     item.style = match
     item.save()