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:
Yuanbin.Chen 2018-03-20 19:12:02 +08:00
parent 8082fbc61f
commit d3a487127f
1 changed files with 1 additions and 1 deletions

View File

@ -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