def try_empresa(id): try: return Empresa.get(Empresa.id == id) except Empresa.DoesNotExist: abort(404)