diff --git a/CHANGELOG.md b/CHANGELOG.md index d808a0ed..0f02f65e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed demo images dependency declarations preventing docker-compose to build successfully. +- Fixed check when submitted an empty batch file on `POST /compute/jobs/upload` +- Fixed error message when `GET /status/systems` encounters error in one filesystem ## [1.14.0] diff --git a/src/compute/compute.py b/src/compute/compute.py index b96dc808..faccf0b8 100644 --- a/src/compute/compute.py +++ b/src/compute/compute.py @@ -401,6 +401,13 @@ def submit_job_upload(): app.logger.error('No batch file selected') error = jsonify(description="Failed to submit job file", error='No batch file selected') return error, 400 + + # decoding content, since from read() method it returns binary encoding + if job_file['content'].decode() == '': + app.logger.error('Batch file is empty') + error = jsonify(description="Failed to submit job file", error='Batch file is empty') + return error, 400 + except RequestEntityTooLarge as re: app.logger.error(re.description) diff --git a/src/status/status.py b/src/status/status.py index 6d9a17f0..670c47a4 100644 --- a/src/status/status.py +++ b/src/status/status.py @@ -321,10 +321,10 @@ def status_systems(): # if status == -5: reason = res["reason"] - ret_dict={"system":machinename, "status":"not available", "description": f"Error on JWT token: {reason}"} + ret_dict={"system": system, "status":"not available", "description": f"Error on JWT token: {reason}"} if status == -4: filesystem = res["filesystem"] - ret_dict={"system":machinename, "status":"not available", "description": f"Filesystem {filesystem} is not available"} + ret_dict={"system": system, "status":"not available", "description": f"Filesystem {filesystem} is not available"} elif status == -2: ret_dict = {"system": system, "status": "not available", "description": "System down"} elif status == -1: