def _create_team(name, metas={}): data = {"name": name} if metas: data["metas"] = metas with app.app_context(): return TeamController.create(data)
def _create_team(name): with app.app_context(): return TeamController.create({'name': name})