Skip to content

Commit

Permalink
No issue: Fix error when importing legacy report (#4390)
Browse files Browse the repository at this point in the history
  • Loading branch information
biaoli0 authored Mar 20, 2023
1 parent d56ba32 commit 31b4b1b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ export class EditDashboardVisualisation extends EditHandler {

async editRecord() {
const { report } = this.req.body;
await assertPermissionGroupAccess(this.accessPolicy, report.permission_group);
// Skip permission check as legacy report has no permission group
if (report.permission_group) {
assertPermissionGroupAccess(this.accessPolicy, report.permission_group);
}
return this.models.wrapInTransaction(async transactingModels => {
const dashboardItemRecord = this.getDashboardItemRecord();
const reportRecord = this.getReportRecord();
Expand Down

0 comments on commit 31b4b1b

Please sign in to comment.