Always add at least one item to a list, fix missing await

This commit is contained in:
Amelia 2025-05-06 20:18:07 +02:00
parent d1c5f4a377
commit 29e2879153
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
2 changed files with 4 additions and 1 deletions

View file

@ -94,7 +94,7 @@ public class PersonController : BaseApiController
}
var success = await _personService.UpdatePersonAliasesAsync(person, dto.Aliases);
if (!success) return BadRequest(_localizationService.Translate(User.GetUserId(), "aliases-have-overlap"));
if (!success) return BadRequest(await _localizationService.Translate(User.GetUserId(), "aliases-have-overlap"));
person.Name = dto.Name?.Trim();

View file

@ -43,6 +43,9 @@ export class EditListComponent implements OnInit {
ngOnInit() {
this.items.forEach(item => this.addItem(item));
if (this.items.length === 0) {
this.addItem("");
}
this.form.valueChanges.pipe(