Closed megh-k closed 2 years ago
Merging #371 (c7a4f04) into main (f439f68) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## main #371 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 72 72
Lines 4670 4680 +10
=========================================
+ Hits 4670 4680 +10
Impacted Files | Coverage Δ | |
---|---|---|
casepro/backend/__init__.py | 100.00% <100.00%> (ø) |
|
casepro/backend/rapidpro.py | 100.00% <100.00%> (ø) |
|
casepro/cases/views.py | 100.00% <100.00%> (ø) |
|
casepro/contacts/models.py | 100.00% <100.00%> (ø) |
|
casepro/contacts/views.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f439f68...c7a4f04. Read the comment docs.
The
push_contact
functionality was necessary for the Open Case button functionality. For this to work a few things are necessary, as summarised below:urn.path
from the frontend but left the placeholder.push_contact
checks for the contact in RapidPro by the URN, if it doesn't exist, the contact is created in RapidPro and the RapidProuuid
is returned.get_or_create_from_urn
looks for the contact in CasePro by the URN, if it does not exist, it gets the contact from RapidPro and itsuuid
, it then looks for the CasePro contact by theuuid
to avoid duplicated, if it still doesn't exist, a new CasePro contact is made and theuuid
is set to match the RapidProuuid
.