From b488fbcb8701d26058584eaa22f7ef042caa3e54 Mon Sep 17 00:00:00 2001 From: ssarwar-topleft <164997480+ssarwar-topleft@users.noreply.github.com> Date: Sat, 12 Oct 2024 00:57:35 +0500 Subject: [PATCH] [ISSUE-3689] Remove set_description from djautotask (#226) * [ISSUE-3689] Remove set_description from djautotask * its only 1.6.4 --------- Co-authored-by: Matt Fox --- djautotask/__init__.py | 2 +- djautotask/sync.py | 30 ------------------------------ 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/djautotask/__init__.py b/djautotask/__init__.py index 3ffb321..a9788a3 100644 --- a/djautotask/__init__.py +++ b/djautotask/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -VERSION = (1, 6, 3, 'final') +VERSION = (1, 6, 4, 'final') # pragma: no cover if VERSION[-1] != "final": diff --git a/djautotask/sync.py b/djautotask/sync.py index efe7392..f498e03 100644 --- a/djautotask/sync.py +++ b/djautotask/sync.py @@ -1149,27 +1149,6 @@ def _assign_field_data(self, instance, object_data): return instance - def set_description(self, note_data): - """ - Set the description for a note. - """ - if self.client.impersonation_resource or \ - note_data.get('created_by_contact_id'): - description = note_data['description'] - else: - resource = note_data.pop('resource') - description = "{}\n\nNote was added by {} {}.".format( - note_data['description'], - resource.first_name, - resource.last_name, - ) - - note_data.update({ - 'description': description - }) - - return note_data - class TicketNoteSynchronizer(ChildCreateRecordMixin, NoteSynchronizer, @@ -1213,7 +1192,6 @@ def create(self, parent, **kwargs): """ Make a request to Autotask to create a Note. """ - kwargs = self.set_description(kwargs) return super().create(parent, **kwargs) @@ -1245,14 +1223,6 @@ def active_ids(self): return active_ids - def create(self, **kwargs): - """ - Make a request to Autotask to create a Note. - """ - kwargs = self.set_description(kwargs) - - return super().create(**kwargs) - class TimeEntrySynchronizer(CreateRecordMixin, MultiConditionBatchQueryMixin,