Merge "fix indicator exception"

This commit is contained in:
Zuul 2018-08-03 09:43:03 +00:00 committed by Gerrit Code Review
commit bc8f390acb
1 changed files with 4 additions and 4 deletions

View File

@ -516,7 +516,7 @@ class EfficacyIndicator(base.APIDictWrapper):
def __init__(self, indicator):
super(EfficacyIndicator, self).__init__(indicator)
self.value = indicator.get('value', None)
self.name = indicator.get('name', None)
self.description = indicator.get('description', None)
self.unit = indicator.get('unit', None)
self.value = getattr(indicator, 'value', None)
self.name = getattr(indicator, 'name', None)
self.description = getattr(indicator, 'description', None)
self.unit = getattr(indicator, 'unit', None)