Various fixes (#362)

This commit is contained in:
Charles Bochet
2023-06-22 14:57:08 -07:00
committed by GitHub
parent ba1dd07e53
commit 1b8b78d615
8 changed files with 17 additions and 18 deletions

View File

@ -47,6 +47,7 @@ export class UpdateCompanyAbilityHandler implements IAbilityHandler {
const company = await this.prismaService.company.findFirst({
where: args.where,
});
assert(company, '', NotFoundException);
return ability.can(AbilityAction.Update, subject('Company', company));