Skip to content

Commit c97b639

Browse files
committed
ID-34: fix migration for config file migration having 'null' properties
1 parent a1366c9 commit c97b639

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/resources/scripts/lib/envconfig.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@ def __reset(self):
137137
# convert to newer version
138138
if "property" in field:
139139
if field["property"]:
140-
source = "property"
141140
field["value"] = field["property"]
142141
field["source"] = "property"
142+
else:
143+
field["source"] = "value"
144+
143145
del field["property"]
144146
self.__migrated = True
145147
elif "source" not in field:
@@ -300,8 +302,12 @@ def __migrate(self):
300302
cert = cert_cfg["update"]
301303

302304
if "password-property" in cert:
303-
cert["password"] = cert["password-property"]
304-
cert["source"] = "property"
305+
if cert["password-property"]:
306+
cert["password"] = cert["password-property"]
307+
cert["source"] = "property"
308+
else:
309+
cert["source"] = "password"
310+
305311
del cert["password-property"]
306312
self.__migrated = True
307313
elif "password" in cert and "source" not in cert:

0 commit comments

Comments
 (0)