diff --git a/.github/scripts/tests/test_oci_selection_setup_wording.py b/.github/scripts/tests/test_oci_selection_setup_wording.py index 47a6fc4c..3e6df1e1 100644 --- a/.github/scripts/tests/test_oci_selection_setup_wording.py +++ b/.github/scripts/tests/test_oci_selection_setup_wording.py @@ -69,7 +69,7 @@ class SelectionSetupWording(TestCase): # It cannot be updated, but it can still be changed or removed. ui = self._stack({'members': [{'native_stack_intent': {'adapt': True}}]}, REPLAY) ui.choose.assert_called_once() - self.assertEqual([tag for tag, _ in ui.choose.call_args.args[1]], ['recreate', 'remove']) + self.assertEqual([tag for tag, _ in ui.choose.call_args.args[1]], ['modify', 'remove']) def _stack(self, stack, expected): record = {'stack': stack} diff --git a/oci/src/proxmenux_oci/management.py b/oci/src/proxmenux_oci/management.py index 6040fe86..2bd597fa 100644 --- a/oci/src/proxmenux_oci/management.py +++ b/oci/src/proxmenux_oci/management.py @@ -484,7 +484,8 @@ def _manage_stack(project, ui, row, action=None, lifecycle_args=()): # A stack that cannot be updated can still be removed. options = [('update', translate('Update every container of the application'))] if updatable else [] options.append(('modify', translate('Modify extra paths and devices'))) - options.append(('recreate', translate('Recreate every container with its saved configuration'))) + if updatable: + options.append(('recreate', translate('Recreate every container with its saved configuration'))) options.append(('remove', translate('Remove: delete the application and its containers'))) action = ui.choose(translate('Manage OCI stack'), options, options[0][0]) if action is None: