fixed issues 199 -2

pull/127/head
tianlinzhong 2022-02-21 23:38:49 +08:00
parent 51b9e43a04
commit 25a9713e23
1 changed files with 11 additions and 10 deletions

View File

@ -939,14 +939,15 @@ class MeterPointCollection:
" WHERE meter_id = %s")
cursor.execute(query, (id_,))
rows = cursor.fetchall()
cursor.execute(" SELECT id "
" FROM tbl_points "
" WHERE object_type = %s ", ('ENERGY_VALUE',))
ponit_ids = cursor.fetchall()
if rows is not None:
for row1 in rows:
cursor.execute(" SELECT object_type "
" FROM tbl_points "
" WHERE id = %s ", (row1[0],))
row = cursor.fetchone()
if row is not None:
if row[0] == 'ENERGY_VALUE':
if row1 in ponit_ids:
cursor.close()
cnx.disconnect()
raise falcon.HTTPError(falcon.HTTP_404, title='API.BAD_REQUEST',