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