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 { Modules, toStringFromBoolean } from "src/common/mappers/module-access.mapper";
|
||||||
import { EmailToIdResolver } from "src/common/mappers/email-id.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 { Result } from "src/common/errors/result-error.factory";
|
||||||
|
|
||||||
import { toStringFromCompanyCode } from "src/identity-and-account/employees/employee.utils";
|
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>> {
|
async updatePreset(dto: SchedulePresetsDto): Promise<Result<boolean, string>> {
|
||||||
const existing = await this.prisma.schedulePresets.findFirst({
|
const existing = await this.prisma.schedulePresets.findFirst({
|
||||||
where: { id: dto.id, name: dto.name },
|
where: { id: dto.id },
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
is_default: true,
|
is_default: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user