From 004bfeff68ad2dd1c5202a9c811f193cdeb59b93 Mon Sep 17 00:00:00 2001 From: "13621160019@163.com" <13621160019@163.com> Date: Wed, 23 Feb 2022 14:42:37 +0800 Subject: [PATCH] added limit 1 to number of ENERGY_VALUE points of meter --- myems-api/core/meter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myems-api/core/meter.py b/myems-api/core/meter.py index 17f4fbd2..9243183e 100644 --- a/myems-api/core/meter.py +++ b/myems-api/core/meter.py @@ -942,7 +942,7 @@ class MeterPointCollection: if rows_points is not None and len(rows_points) > 0: cursor.close() cnx.disconnect() - raise falcon.HTTPError(falcon.HTTP_404, title='API.BAD_REQUEST', + raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR', description='API.METER_CANNOT_HAVE_MORE_THAN_ONE_ENERGY_VALUE_POINTS') query = (" SELECT id "