From: Parker Berberian Date: Mon, 16 Mar 2020 14:27:05 +0000 (-0400) Subject: Fix Query in api MakeHardwareConfig X-Git-Tag: 2.0.99~36^2~4^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F69791%2F1;p=laas.git Fix Query in api MakeHardwareConfig Change-Id: I9ced78e73f49343bcb41b8e0de25d8b0223b14bd Signed-off-by: Parker Berberian --- diff --git a/src/api/models.py b/src/api/models.py index de73a7a..c61341e 100644 --- a/src/api/models.py +++ b/src/api/models.py @@ -941,7 +941,7 @@ class JobFactory(object): for res in resources: hardware_config = None try: - hardware_config = HardwareConfig.objects.get(relation__host=res) + hardware_config = HardwareConfig.objects.get(relation__resource_id=res.labid) except Exception: hardware_config = HardwareConfig()