tutorcruncher / hermes

1 stars 0 forks source link

Fix Organisaition Admins, for BDR, Sales #240

Closed PrenSJ2 closed 4 months ago

PrenSJ2 commented 4 months ago

Close #238

Fix Updating BDR, Sales and support admins in pipedrive update hermes, which in turn update TC2 accordingly

also improved the readme

Testing steps

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 52.38095% with 10 lines in your changes missing coverage. Please review.

Project coverage is 93.56%. Comparing base (590b3d4) to head (0ee58a7).

Files Patch % Lines
app/pipedrive/_schema.py 33.33% 4 Missing and 2 partials :warning:
app/tc2/tasks.py 66.66% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #240 +/- ## ========================================== - Coverage 93.94% 93.56% -0.39% ========================================== Files 29 29 Lines 1719 1740 +21 Branches 230 237 +7 ========================================== + Hits 1615 1628 +13 - Misses 66 71 +5 - Partials 38 41 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

PrenSJ2 commented 4 months ago
  • [ ] 422 error in the following scenario: Change the bdr_person_id or support_person_id to one that doesn't exist in hermes. Then when we edit the id to one that does exist it will error because the in the previous of the request the admin doesn't exist.

Re this, currently it is a validation error if the sales team set the incorrect support person or bdr person id in PD, as the incorrect validation then stops any of the possibly correct fields being updated.

a possible solution is to change the raise RequestValidationError in a_vaildate to a log, and set to None, however, I am resistant to do this, as it will make the code less dynamic