Esempio n. 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'])
Esempio n. 2
0
 def add_missing_layers(self, data, **kwargs):
     return wrap_data(data, 'amount', ['unit', 'value'])
Esempio n. 3
0
 def add_missing_layers(self, data, **kwargs):
     return wrap_data(data, 'temp', ['value', 'unit'])