Skip to content

Commit

Permalink
pep8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssarwar-topleft committed Nov 1, 2024
1 parent 102af71 commit 885c7ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
27 changes: 0 additions & 27 deletions djautotask/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion djautotask/tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 885c7ad

Please sign in to comment.