Skip to content

Commit 779b4b8

Browse files
committed
fixed issue where deleted application was still thought to exist causing create_if_not_exist to fail
1 parent 5556880 commit 779b4b8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/src/main/python/wlsdeploy/tool/deploy/applications_deployer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,9 @@ def __add_applications(self):
152152
root_path = self.aliases.get_wlst_subfolders_path(self._base_location)
153153
application_location = LocationContext(self._base_location).append_location(APPLICATION)
154154
application_token = self.aliases.get_name_token(application_location)
155-
existing_applications = deployer_utils.get_existing_object_list(application_location, self.aliases)
156155

157156
for application_name in applications:
158-
self.logger.info('WLSDPLY-09301', APPLICATION, application_name, self._parent_type, self._parent_name,
159-
class_name=self._class_name, method_name=_method_name)
157+
existing_applications = deployer_utils.get_existing_object_list(application_location, self.aliases)
160158

161159
if model_helper.is_delete_name(application_name):
162160
if self.__verify_delete_versioned_app(application_name, existing_applications, type='app'):
@@ -165,6 +163,9 @@ def __add_applications(self):
165163
existing_names = deployer_utils.get_existing_object_list(location, self.aliases)
166164
deployer_utils.delete_named_element(location, application_name, existing_names, self.aliases)
167165
continue
166+
else:
167+
self.logger.info('WLSDPLY-09301', APPLICATION, application_name, self._parent_type, self._parent_name,
168+
class_name=self._class_name, method_name=_method_name)
168169

169170
application = \
170171
copy.deepcopy(dictionary_utils.get_dictionary_element(applications, application_name))

0 commit comments

Comments
 (0)