Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2226242_Payment_verification_page_not_accessible #4514

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export const PaymentPlanDetailsHeader = ({
return null;
}

if (!programCycleData) return null;

const breadCrumbsItems: BreadCrumbsItem[] = [];

if (programCycleId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export const PaymentPlanDetailsPage = (): ReactElement => {
fetchPolicy: 'network-only',
});



const status = data?.paymentPlan?.status;
const backgroundActionStatus = data?.paymentPlan?.backgroundActionStatus;

Expand Down Expand Up @@ -73,6 +75,7 @@ export const PaymentPlanDetailsPage = (): ReactElement => {
status === PaymentPlanStatus.Finished;

const { paymentPlan } = data;
if (!paymentPlan) return null;

return (
<UniversalErrorBoundary
Expand Down Expand Up @@ -116,7 +119,7 @@ export const PaymentPlanDetailsPage = (): ReactElement => {
</>
)}
{hasPermissions(PERMISSIONS.ACTIVITY_LOG_VIEW, permissions) && (
<UniversalActivityLogTable objectId={paymentPlan.id} />
<UniversalActivityLogTable objectId={paymentPlan?.id} />
)}
</Box>
</UniversalErrorBoundary>
Expand Down
2 changes: 1 addition & 1 deletion src/hct_mis_api/apps/payment/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def resolve_total_number_of_households(self, info: Any, **kwargs: Any) -> int:
return self.payment_items.count()

def resolve_verification_status(self, info: Any, **kwargs: Any) -> Optional[graphene.String]:
return self.payment_verification_summary.status if self.payment_verification_summary else None
return self.payment_verification_summary.status if hasattr(self, "payment_verification_summary") else None

def resolve_status(self, info: Any, **kwargs: Any) -> Optional[graphene.String]:
return self.status
Expand Down
Loading