From 885c7ad38b0d1b90788a982776e574cfcd57e7fb Mon Sep 17 00:00:00 2001 From: Shoaib Sarwar Date: Fri, 1 Nov 2024 15:07:30 +0500 Subject: [PATCH] pep8 fixes --- djautotask/sync.py | 27 --------------------------- djautotask/tests/test_sync.py | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/djautotask/sync.py b/djautotask/sync.py index df120ef..12e6b94 100644 --- a/djautotask/sync.py +++ b/djautotask/sync.py @@ -2005,33 +2005,6 @@ def active_ids(self): return active_ids -class CompanyAlertSynchronizer(BatchQueryMixin, Synchronizer): - client_class = api.CompanyAlertAPIClient - model_class = models.CompanyAlertTracker - condition_field_name = 'companyID' - last_updated_field = None - - related_meta = { - 'companyID': (models.Account, 'account'), - } - - def _assign_field_data(self, instance, object_data): - instance.id = object_data['id'] - instance.alert_text = object_data.get('alertText') - instance.alert_type = object_data.get('alertTypeID') - - self.set_relations(instance, object_data) - - return instance - - @property - def active_ids(self): - active_ids = models.Account.objects.all().\ - values_list('id', flat=True).order_by(self.lookup_key) - - return active_ids - - class ContractExclusionSetSynchronizer(Synchronizer): client_class = api.ContractExclusionSetAPIClient model_class = models.ContractExclusionSetTracker diff --git a/djautotask/tests/test_sync.py b/djautotask/tests/test_sync.py index 4d70750..e2e76d6 100644 --- a/djautotask/tests/test_sync.py +++ b/djautotask/tests/test_sync.py @@ -1230,7 +1230,7 @@ def _assert_fields(self, instance, object_data): self.assertEqual(instance.contract_exclusion_set.id, object_data['contractExclusionSetID']) self.assertEqual(instance.excluded_work_type.id, - object_data['excludedWorkTypeID']) + object_data['excludedWorkTypeID']) class TestCompanyAlertsSynchronizer(SynchronizerTestMixin, TestCase):