fix: allow edit to empty name (#3322)

This commit is contained in:
martin 2023-07-18 04:20:28 +02:00 committed by GitHub
parent 8045fd3f14
commit 632971a2ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -50,7 +50,7 @@ export class PersonService {
async update(authUser: AuthUserDto, id: string, dto: PersonUpdateDto): Promise<PersonResponseDto> {
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);

View File

@ -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}
/>
<Button size="sm" type="submit">Done</Button>