Skip to content

Commit

Permalink
Fix reportID being passed to getPolicy instead of policyID
Browse files Browse the repository at this point in the history
  • Loading branch information
youssef-lr committed Aug 16, 2024
1 parent 9940e99 commit ba6a109
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3003,7 +3003,7 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>
return false;
}

const policy = getPolicy(moneyRequestReport?.reportID ?? '-1');
const policy = getPolicy(moneyRequestReport?.policyID ?? '');
const isAdmin = isExpenseReport(moneyRequestReport) && policy?.role === CONST.POLICY.ROLE.ADMIN;
const isManager = isExpenseReport(moneyRequestReport) && currentUserAccountID === moneyRequestReport?.managerID;

Expand Down

0 comments on commit ba6a109

Please sign in to comment.