Skip to content

Commit

Permalink
Merge pull request #440 from dimagi/pkv/fix-payment-unit-admin-error
Browse files Browse the repository at this point in the history
Fix error in payment unit admin
  • Loading branch information
pxwxnvermx authored Nov 21, 2024
2 parents 464c0a0 + 5ce6cde commit 9484d55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commcare_connect/opportunity/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def get_username(self, obj):
@admin.register(PaymentUnit)
class PaymentUnitAdmin(admin.ModelAdmin):
list_display = ["name", "get_opp_name"]
search_fields = ["name"]
search_fields = ["name", "opportunity__name"]

@admin.display(description="Opportunity Name")
def get_opp_name(self, obj):
return obj.opportunity_access.opportunity.name
return obj.opportunity.name

0 comments on commit 9484d55

Please sign in to comment.