def deleteIce(self, iceid): dao = IceDAO() if not dao.getIceById(iceid): return jsonify("Error ice not found") else: dao.delete(iceid) return jsonify(DeleteStatus="OK")
def deleteIce(self, ice_id): ice_dao = IceDAO() res_dao = ResourceDAO() if not ice_dao.getIceById(ice_id): return jsonify(Error = "Ice not found."), 404 else: resource_id = ice_dao.delete(ice_id) res_dao.delete(resource_id) return jsonify(DeleteStatus = "OK"), 200