fixed issue when deleting offline meter file

pull/19/MERGE
13621160019@163.com 2021-03-16 12:07:10 +08:00
parent 45414659df
commit 82479e8b18
2 changed files with 24 additions and 24 deletions

View File

@ -208,8 +208,8 @@ class OfflineMeterFileItem:
# remove the file from disk # remove the file from disk
os.remove(file_path) os.remove(file_path)
except Exception as ex: except Exception as ex:
raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR', # ignore exception and don't return API.OFFLINE_METER_FILE_NOT_FOUND error
description='API.OFFLINE_METER_FILE_NOT_FOUND') pass
# Note: the energy data imported from the deleted file will not be deleted # Note: the energy data imported from the deleted file will not be deleted
cursor.execute(" DELETE FROM tbl_offline_meter_files WHERE id = %s ", (id_,)) cursor.execute(" DELETE FROM tbl_offline_meter_files WHERE id = %s ", (id_,))