fix(presets): removed name from where clause to find the preset
This commit is contained in:
parent
71aeeb7133
commit
acc128e5ea
|
|
@ -3,7 +3,7 @@ import { PrismaService } from "src/prisma/prisma.service";
|
|||
|
||||
import { Modules, toStringFromBoolean } from "src/common/mappers/module-access.mapper";
|
||||
import { EmailToIdResolver } from "src/common/mappers/email-id.mapper";
|
||||
import { toDateFromString, toStringFromDate } from "src/common/utils/date-utils";
|
||||
import { toStringFromDate } from "src/common/utils/date-utils";
|
||||
import { Result } from "src/common/errors/result-error.factory";
|
||||
|
||||
import { toStringFromCompanyCode } from "src/identity-and-account/employees/employee.utils";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export class SchedulePresetUpdateService {
|
|||
//_________________________________________________________________
|
||||
async updatePreset(dto: SchedulePresetsDto): Promise<Result<boolean, string>> {
|
||||
const existing = await this.prisma.schedulePresets.findFirst({
|
||||
where: { id: dto.id, name: dto.name },
|
||||
where: { id: dto.id },
|
||||
select: {
|
||||
id: true,
|
||||
is_default: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user