Skip to content

Commit

Permalink
Support activated signal.
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiencyr committed Jun 13, 2021
1 parent e715014 commit 0a3da6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/vorta/views/repo_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ def set_repos(self):

def populate_repositories(self):
try:
self.repoSelector.currentIndexChanged.disconnect(self.repo_select_action)
self.repoSelector.activated.disconnect(self.repo_select_action)
except TypeError: # raised when signal is not connected
pass
self.repoSelector.activated.connect(self.repo_select_action)
self.set_repos()
self.repoSelector.currentIndexChanged.connect(self.repo_select_action)
self.populate_from_profile()

def populate_from_profile(self):
Expand Down
14 changes: 10 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import os
import peewee
import pytest
import sys
from datetime import datetime as dt
from unittest.mock import MagicMock

import peewee
import pytest

import vorta
import vorta.application
from vorta.models import (RepoModel, RepoPassword, BackupProfileModel, SourceFileModel,
SettingsModel, ArchiveModel, WifiSettingModel, EventLogModel, SchemaVersion)
SettingsModel, ArchiveModel, WifiSettingModel, EventLogModel, SchemaVersion,
BackupProfileMixin)
from vorta.views.main_window import MainWindow

models = [RepoModel, RepoPassword, BackupProfileModel, SourceFileModel,
models = [RepoModel, RepoPassword, BackupProfileModel, BackupProfileMixin , SourceFileModel,
SettingsModel, ArchiveModel, WifiSettingModel, EventLogModel, SchemaVersion]


Expand Down Expand Up @@ -53,6 +55,10 @@ def init_db(qapp, qtbot, tmpdir_factory):
new_repo.save()

default_profile.repo = new_repo.id

profile_mixin = BackupProfileMixin(repo=new_repo.id, profile=default_profile.id)
profile_mixin.save()

default_profile.dont_run_on_metered_networks = False
default_profile.save()

Expand Down

0 comments on commit 0a3da6d

Please sign in to comment.