Fixed update check
This commit is contained in:
parent
8c877a8b0a
commit
c4da55a4f9
1 changed files with 4 additions and 2 deletions
|
@ -223,13 +223,13 @@ class WorkerThread(QThread):
|
|||
|
||||
def sync(self):
|
||||
try:
|
||||
print('inside syns workertheard')
|
||||
if self.action == 'SYNC_TOR':
|
||||
ConfigurationController.set_connection('tor')
|
||||
else:
|
||||
ConfigurationController.set_connection('system')
|
||||
ClientController.sync(client_observer=client_observer, connection_observer=connection_observer)
|
||||
locations = LocationController.get_all()
|
||||
print(locations)
|
||||
all_location_codes = [f"{location.country_code}_{location.code}" for location in locations]
|
||||
self.sync_output.emit(all_location_codes, True, False, locations, False)
|
||||
except Exception as e:
|
||||
|
@ -1060,6 +1060,7 @@ class Worker(QObject):
|
|||
self.force = self.profile_data.get('force', False)
|
||||
|
||||
def run(self):
|
||||
print('inside enable worker thread')
|
||||
self.profile = ProfileController.get(int(self.profile_data['id']))
|
||||
|
||||
if 'billing_code' in self.profile_data:
|
||||
|
@ -1089,6 +1090,7 @@ class Worker(QObject):
|
|||
except CommandNotFoundError as e :
|
||||
self.update_signal.emit(str(e), False, -1, None, None)
|
||||
except Exception as e:
|
||||
print('exception inside thread')
|
||||
print(e)
|
||||
self.update_signal.emit("An unknown error occurred", False, None, None, None)
|
||||
|
||||
|
@ -5671,7 +5673,7 @@ class SyncScreen(Page):
|
|||
|
||||
update_available = ClientController.can_be_updated()
|
||||
|
||||
if not update_available:
|
||||
if update_available:
|
||||
menu_page = self.page_stack.findChild(MenuPage)
|
||||
menu_page.on_update_check_finished()
|
||||
|
||||
|
|
Loading…
Reference in a new issue