Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions salesforce/management/commands/sync_thank_you_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ def handle(self, *args, **options):
with Salesforce() as sf:
num_created = 0
for note in new_thank_you_notes:
# junk removal
if note.thank_you_note and len(note.thank_you_note) < 5: # we expect at least a 'thank'
note.delete()
# junk school rename
if note.institution and note.institution.isdigit(): # we expect at least text
note.institution = "Find Me A Home" # Use Find Me A Home
note.save()


account_id = school_list["Find Me A Home"]

# If note has a school name, see if we can match it and use that account id when creating
Expand Down