-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle Pipedrive merging of Org, Person or Deal #227
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #227 +/- ##
==========================================
+ Coverage 93.76% 93.86% +0.10%
==========================================
Files 29 29
Lines 1652 1712 +60
Branches 211 228 +17
==========================================
+ Hits 1549 1607 +58
Misses 66 66
- Partials 37 39 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing, the info was in current and I was getting errors because there was nothing in the previous section which is referenced by the new prepare_event_data
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else lgtm
Fix #188
The Problem
The sales team often merge Pipedrive Objects (Organizations, Persons, Deals)
this causes the custom field
hermes_id
to be combined 123 --> '123, 456'which in turn causes a validation error as we are expecting the
hermes_id
to be typeFK_FIELD
which is anint
Solution
In
PipedriveEvent
vaidate_obj
, ifhermes_id
is astr
we use the newly createdhandle_duplicate_hermes_ids
to select a main object and update all the associated objects to have the main object idTesting
make restore-from-live
python -m uvicorn app.main:app --reload
localhost:8000/pipedrive/callback/
Test Deal
meeting/create
/pipedrive/callback/
with:check that the deal id for the newly created meeting is now 5712
check that the deal you created has been deleted
Testing Organisation
/contact/create
/deal/create
/pipedrive/callback/
test that the contact's company was updated to 6998
test that the deal's company was updated to 6998
test that company A was deleted
Test Contact
/pipedrive/callback/
with