fix indicator exception
When the indicator is none, there could be exception. This patch could avoid this exception. Change-Id: Ia243197ccab149a26f8bdf092b190c2c29c03ee5
This commit is contained in:
parent
79fcf55752
commit
8193610532
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue