|
14 | 14 | from wlsdeploy.aliases.model_constants import APPLICATION
|
15 | 15 | from wlsdeploy.aliases.model_constants import KUBERNETES
|
16 | 16 | from wlsdeploy.aliases.model_constants import LIBRARY
|
17 |
| -from wlsdeploy.aliases.model_constants import SOURCE_PATH |
18 |
| -from wlsdeploy.exception import exception_helper |
19 | 17 | from wlsdeploy.json.json_translator import COMMENT_MATCH
|
20 | 18 | from wlsdeploy.logging.platform_logger import PlatformLogger
|
21 | 19 | from wlsdeploy.util import dictionary_utils
|
@@ -430,14 +428,14 @@ def _finalize_folder(self, current_folder, past_folder, change_folder, location)
|
430 | 428 |
|
431 | 429 | # Application and Library should include SourcePath if they have any other elements
|
432 | 430 | if (len(folder_path) == 1) and (folder_path[0] in self.SOURCE_PATH_FOLDERS):
|
433 |
| - if change_folder and (SOURCE_PATH not in change_folder): |
434 |
| - # if SourcePath not present, past and current folder had matching values |
435 |
| - source_path = dictionary_utils.get_element(current_folder, SOURCE_PATH) |
436 |
| - if source_path is not None: |
437 |
| - comment = exception_helper.get_message('WLSDPLY-05714', SOURCE_PATH) |
438 |
| - _add_comment(comment, change_folder) |
439 |
| - change_folder[SOURCE_PATH] = source_path |
440 |
| - |
| 431 | + # Handling Application and Library changes but keep the original that has not been changed |
| 432 | + if change_folder: |
| 433 | + orig_keys = dictionary_utils.get_dictionary_attributes(past_folder) |
| 434 | + for key in orig_keys: |
| 435 | + if key not in change_folder.keys(): |
| 436 | + key_value = dictionary_utils.get_element(past_folder, key) |
| 437 | + if key_value is not None: |
| 438 | + change_folder[key] = key_value |
441 | 439 |
|
442 | 440 | def _add_comment(comment, dictionary):
|
443 | 441 | """
|
|
0 commit comments