Skip to content

Commit

Permalink
core: fix copy referenced problem
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-moe committed Nov 23, 2024
1 parent 979f68a commit 3acff34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hydrooj/src/handler/problem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
domain.get(this.pdoc.reference.domainId),
]);
if (!pdoc) throw new ProblemNotFoundError(this.pdoc.reference.domainId, this.pdoc.reference.pid);
t = `,${ddoc.domain.share || ''},`;
t = `,${ddoc.share || ''},`;
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(ddoc._id, target);
}
if (!dudoc.hasPerm(PERM.PERM_CREATE_PROBLEM)) throw new PermissionError(PERM.PERM_CREATE_PROBLEM);
Expand Down

0 comments on commit 3acff34

Please sign in to comment.