Skip to content

Commit

Permalink
fix migration path
Browse files Browse the repository at this point in the history
  • Loading branch information
sravfeyn committed Dec 15, 2024
1 parent 1f735c5 commit cf896eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Migration(migrations.Migration):
dependencies = [
("opportunity", "0060_completedwork_payment_date"),
("opportunity", "0062_opportunityaccess_invited_date"),
]

operations = [
Expand Down
6 changes: 3 additions & 3 deletions commcare_connect/opportunity/payment_number_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ def object_list(self):
usernames = OpportunityAccess.objects.filter(opportunity_id=opportunity).values_list(
"user__username", flat=True
)
connecteid_statuses = fetch_payment_phone_numbers(usernames, status)
connectid_statuses = fetch_payment_phone_numbers(usernames, status)
# display local status when its overridden
local_statuses = OrgUserPaymentNumberStatus.objects.filter(
user__username__in=usernames, organization=self.request.org
)
local_statuses_by_username = {status.username: status for status in local_statuses}
for status in connecteid_statuses:
for status in connectid_statuses:
local_status = local_statuses_by_username.get(status["username"])
if local_status and local_status.phone_number == status["phone_number"]:
status["status"] = local_status.status
return connecteid_statuses
return connectid_statuses

def post(self, request, *args, **kwargs):
user_statuses = defaultdict(dict)
Expand Down

0 comments on commit cf896eb

Please sign in to comment.