Fix hints update appear 'NoneType' object has no attribute 'update'
This patch fix hints update error, If scheduler_hints not configure in create profile, the hints get 'None' value, the None not exist update operation. Change-Id: Id8ac13b9c190a4ece8d098837c47964059fd33fe Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
This commit is contained in:
parent
8082fbc61f
commit
d3a487127f
|
@ -844,7 +844,7 @@ class ServerProfile(base.Profile):
|
|||
|
||||
if 'servergroup' in obj.data['placement']:
|
||||
group_id = obj.data['placement']['servergroup']
|
||||
hints = self.properties.get(self.SCHEDULER_HINTS, {})
|
||||
hints = self.properties.get(self.SCHEDULER_HINTS) or {}
|
||||
hints.update({'group': group_id})
|
||||
kwargs['scheduler_hints'] = hints
|
||||
|
||||
|
|
Loading…
Reference in New Issue