From cf896eb401b3629c7d263b01855eadec6efa49c2 Mon Sep 17 00:00:00 2001 From: Sravan Reddy Date: Sun, 15 Dec 2024 20:27:02 +0530 Subject: [PATCH] fix migration path --- ...equired.py => 0063_opportunity_payment_info_required.py} | 2 +- commcare_connect/opportunity/payment_number_report.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename commcare_connect/opportunity/migrations/{0061_opportunity_payment_info_required.py => 0063_opportunity_payment_info_required.py} (84%) diff --git a/commcare_connect/opportunity/migrations/0061_opportunity_payment_info_required.py b/commcare_connect/opportunity/migrations/0063_opportunity_payment_info_required.py similarity index 84% rename from commcare_connect/opportunity/migrations/0061_opportunity_payment_info_required.py rename to commcare_connect/opportunity/migrations/0063_opportunity_payment_info_required.py index 84f5255b..5cd2ab93 100644 --- a/commcare_connect/opportunity/migrations/0061_opportunity_payment_info_required.py +++ b/commcare_connect/opportunity/migrations/0063_opportunity_payment_info_required.py @@ -5,7 +5,7 @@ class Migration(migrations.Migration): dependencies = [ - ("opportunity", "0060_completedwork_payment_date"), + ("opportunity", "0062_opportunityaccess_invited_date"), ] operations = [ diff --git a/commcare_connect/opportunity/payment_number_report.py b/commcare_connect/opportunity/payment_number_report.py index 80d80766..a64e4c57 100644 --- a/commcare_connect/opportunity/payment_number_report.py +++ b/commcare_connect/opportunity/payment_number_report.py @@ -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)