示例#1
0
    def add_missing_layers(self, data, many, **kwargs):
        if many:
            result = []

            for each in data:
                result.append(
                    wrap_data(each, 'ingredients', ['malt', 'hops', 'yeast']))

            return result

        return wrap_data(data, 'ingredients', ['malt', 'hops', 'yeast'])
示例#2
0
 def add_missing_layers(self, data, **kwargs):
     return wrap_data(data, 'amount', ['unit', 'value'])
示例#3
0
 def add_missing_layers(self, data, **kwargs):
     return wrap_data(data, 'temp', ['value', 'unit'])