fixed issue when deleting offline meter file
parent
45414659df
commit
82479e8b18
|
@ -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_,))
|
||||||
|
|
Loading…
Reference in New Issue