diff --git a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py index 59a11c877..9829e3ba9 100755 --- a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py +++ b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py @@ -354,6 +354,9 @@ def get_build_task(task_id): try: task = BuildsLogic.get_build_task(task_id) build_record = get_build_record(task) + if build_record is None: + build_record = {} + return flask.jsonify(build_record) except CoprHttpException as ex: jsonout = flask.jsonify({"msg": str(ex)}) @@ -370,6 +373,9 @@ def get_srpm_build_task(build_id): jsonout.status_code = 404 return jsonout build_record = get_srpm_build_record(task) + if build_record is None: + build_record = {} + return flask.jsonify(build_record)