def select_bag(): """ Set the specified bag as the current bag. The current bag will be available as session.current_bag args: [bag_id] """ bag = None try: bag = bag_utils.is_modifiable_bag(request.args(0)) except: bag = bag_utils.auto_bag_selection() if not bag: raise HTTP(404) session.current_bag = bag.id return bag_utils.bag_selection_return_format(bag)
def select_bag(): """ args: [id_bag] """ bag = check_bag_owner(request.args(0)) return bag_selection_return_format(bag)