Fix nonetype error in lifecycle override update
This fixes the nonetype error seen during lifecycle hooks issued during
platform backup. An additional none check was added so that a none type
does not get passed to the rstrip function that caused the issue.
Test Plan:
PASS With the changes, no lifecycle error is caused by the portieris
app during platform backup.
PASS Portieris application sanity test
Closes-bug: 2087987
Change-Id: I4c7204f5aaa72871a5818be834249e7274cbaff7
Signed-off-by: Tae Park <tae.park@windriver.com>
This commit is contained in:
@@ -311,7 +311,7 @@ class PortierisAppLifecycleOperator(base.AppLifecycleOperator):
|
||||
return overrides.user_overrides or ""
|
||||
|
||||
def _update_helm_user_overrides(self, dbapi_instance, db_app_id, updated_overrides):
|
||||
if updated_overrides.rstrip('\n') == '{}':
|
||||
if updated_overrides is not None and updated_overrides.rstrip('\n') == '{}':
|
||||
updated_overrides = None
|
||||
dbapi_instance.helm_override_update(
|
||||
app_id=db_app_id,
|
||||
|
||||
Reference in New Issue
Block a user