Skip to content

Commit

Permalink
Merge branch 'master' into 3728-integrityerror-update-or-delete-on-ta…
Browse files Browse the repository at this point in the history
…ble-users_user-violates-foreign-key-constraint
  • Loading branch information
kti-sam authored Oct 11, 2024
2 parents 6035e41 + b488fbc commit dc92bcf
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions djautotask/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,27 +1162,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,
Expand Down Expand Up @@ -1226,7 +1205,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)

Expand Down Expand Up @@ -1258,14 +1236,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,
Expand Down

0 comments on commit dc92bcf

Please sign in to comment.