From a4ec0739ea838041931b1b437d7f3982b9fe1694 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 16 Sep 2016 15:21:42 -0400 Subject: [PATCH] Temporarily disable instance id gathering During requests --- awx/main/managers.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/awx/main/managers.py b/awx/main/managers.py index ca4578daf4..bb796865b4 100644 --- a/awx/main/managers.py +++ b/awx/main/managers.py @@ -32,8 +32,13 @@ class InstanceManager(models.Manager): hostname='localhost', uuid='00000000-0000-0000-0000-000000000000') - # Return the appropriate record from the database. - return self.get(hostname=socket.gethostname()) + # If we can determine the instance we are on then return + # that, otherwise None which would be the standalone + # case + # TODO: Replace, this doesn't work if the hostname + # is different from the Instance.name + # node = self.filter(hostname=socket.gethostname()) + return self.all()[0] def my_role(self): # NOTE: TODO: Likely to repurpose this once standalone ramparts are a thing