Always add at least one item to a list, fix missing await
This commit is contained in:
parent
d1c5f4a377
commit
29e2879153
2 changed files with 4 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ public class PersonController : BaseApiController
|
||||||
}
|
}
|
||||||
|
|
||||||
var success = await _personService.UpdatePersonAliasesAsync(person, dto.Aliases);
|
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();
|
person.Name = dto.Name?.Trim();
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ export class EditListComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.items.forEach(item => this.addItem(item));
|
this.items.forEach(item => this.addItem(item));
|
||||||
|
if (this.items.length === 0) {
|
||||||
|
this.addItem("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.form.valueChanges.pipe(
|
this.form.valueChanges.pipe(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue