Skip to content

Commit 92aaeb4

Browse files
committed
don't allow a report with 0 total to be moved to another workspace
1 parent 3335fa2 commit 92aaeb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/ReportChangeWorkspacePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function ReportChangeWorkspacePage({report}: ReportChangeWorkspacePageProps) {
5959
additionalFilter: (newPolicy) => isWorkspaceEligibleForReportChange(newPolicy, report, oldPolicy, currentUserLogin),
6060
});
6161

62-
if (!isExpenseReport(report) || isMoneyRequestReportPendingDeletion(report)) {
62+
if (!isExpenseReport(report) || isMoneyRequestReportPendingDeletion(report) || (!report.total && !report.unheldTotal)) {
6363
return <NotFoundPage />;
6464
}
6565

0 commit comments

Comments
 (0)