From 632971a2acb365c2a3102017da2e0e55fe1f273d Mon Sep 17 00:00:00 2001 From: martin <74269598+martabal@users.noreply.github.com> Date: Tue, 18 Jul 2023 04:20:28 +0200 Subject: [PATCH] fix: allow edit to empty name (#3322) --- server/src/domain/person/person.service.ts | 2 +- web/src/lib/components/faces-page/edit-name-input.svelte | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/domain/person/person.service.ts b/server/src/domain/person/person.service.ts index 87046c50f8..4310ef431b 100644 --- a/server/src/domain/person/person.service.ts +++ b/server/src/domain/person/person.service.ts @@ -50,7 +50,7 @@ export class PersonService { async update(authUser: AuthUserDto, id: string, dto: PersonUpdateDto): Promise { let person = await this.findOrFail(authUser, id); - if (dto.name) { + if (dto.name !== undefined) { person = await this.repository.update({ id, name: dto.name }); const assets = await this.repository.getAssets(authUser.id, id); const ids = assets.map((asset) => asset.id); diff --git a/web/src/lib/components/faces-page/edit-name-input.svelte b/web/src/lib/components/faces-page/edit-name-input.svelte index f4fff8918d..c2527c0fd2 100644 --- a/web/src/lib/components/faces-page/edit-name-input.svelte +++ b/web/src/lib/components/faces-page/edit-name-input.svelte @@ -38,7 +38,6 @@ class="gap-2 w-full bg-gray-100 dark:bg-gray-700 dark:text-white" type="text" placeholder="New name or nickname" - required bind:value={name} />