From 98e011f1f8af900ed6f65432ad7466973d44735a Mon Sep 17 00:00:00 2001 From: Vendula Poncova Date: Fri, 27 Nov 2020 14:33:31 +0100 Subject: [PATCH] Fix the logic for enabling latest updates Fix bugs introduced in the commit 4a2b8f2. The negation of the logic wasn't applied correctly. Without the fix, updates repositories are disabled when the updates are enabled. --- pyanaconda/ui/gui/spokes/installation_source.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pyanaconda/ui/gui/spokes/installation_source.py b/pyanaconda/ui/gui/spokes/installation_source.py index 00a180613..e528d8662 100644 --- a/pyanaconda/ui/gui/spokes/installation_source.py +++ b/pyanaconda/ui/gui/spokes/installation_source.py @@ -1085,7 +1085,7 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler): uncheck it. """ self._updates_box.set_sensitive(self._mirror_active()) - active = self._mirror_active() or self.payload.is_repo_enabled("updates") + active = self._mirror_active() and self.payload.is_repo_enabled("updates") self._updates_radio_button.set_active(active) @property @@ -1646,10 +1646,8 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler): def on_updatesRadioButton_toggled(self, button): """Toggle the enable state of the updates repo.""" - if self._updates_radio_button.get_active(): - self.payload.set_updates_enabled(False) - else: - self.payload.set_updates_enabled(True) + active = self._updates_radio_button.get_active() + self.payload.set_updates_enabled(active) # Refresh the metadata using the new set of repos self._updates_change = True -- 2.23.0