tutorcruncher / hermes

1 stars 0 forks source link

Handle Deal with id does not exist #228

Closed PrenSJ2 closed 5 months ago

PrenSJ2 commented 5 months ago

image

something weird is happening in a_vaildate

PrenSJ2 commented 5 months ago

I think the problem is that deals are triggering an update to the Company, by the deals' hermes id

Image

https://tutorcruncher.pipedrive.com/deal/5472

PrenSJ2 commented 5 months ago

I think the problem is that when we are validating the PipedriveEvent to a PDDeal or PDPerson ... the event data only contains name and hermes_id so the validation doesn't know which object to validate against, thus chooses the wrong one

PrenSJ2 commented 5 months ago

turns out this is actually due to the callbooker sending two identical sales/book at the same time to hermes, which then causes us to create two deals ... two orgs ... two companies ... and then there is either a race condition or we are deleting the first company without updating the information

image

Therefore this should involve, #63