From 34ecc3ec06e03edc27d8397003e5dcb930cc40cd Mon Sep 17 00:00:00 2001 From: Will Fosoter Date: Sat, 5 Oct 2024 14:31:10 +0100 Subject: [PATCH] fix: stack trace with str value of intspeed. * We should be casting int for comparing interface speeds. * Add new CI job for latest branch fixes: https://github.com/redhat-performance/quads/issues/535 Change-Id: Id4748bf76f79d804c9063a8482308eb9447e6b03 --- container/server/container-compose.yml | 2 +- src/quads/server/blueprints/interfaces.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/container/server/container-compose.yml b/container/server/container-compose.yml index 75d14c681..a0a0ea7ff 100644 --- a/container/server/container-compose.yml +++ b/container/server/container-compose.yml @@ -41,7 +41,7 @@ services: environment: SQLALCHEMY_DATABASE_URI: "postgresql://postgres:postgres@quads_db:5432/quads" volumes: - - /var/lib/jenkins/workspace/Quads-2.1:/opt/quads:z + - /var/lib/jenkins/workspace/QUADS-2.1-Latest:/opt/quads:z networks: podman: ipv4_address: 10.88.0.11 diff --git a/src/quads/server/blueprints/interfaces.py b/src/quads/server/blueprints/interfaces.py index 49f3f8c6c..06e59e061 100644 --- a/src/quads/server/blueprints/interfaces.py +++ b/src/quads/server/blueprints/interfaces.py @@ -69,7 +69,7 @@ def create_interface(hostname: str) -> Response: return make_response(jsonify(response), 400) speed = data.get("speed") - if speed and not speed > 0: + if int(speed) and not int(speed) > 0: response = { "status_code": 400, "error": "Bad Request",