web/admin: fix error in outpost form dropdown

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2023-01-01 22:27:23 +01:00
parent 3980eea7c6
commit aef9a22331
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ export class OutpostForm extends ModelForm<Outpost, string> {
return groupBy(items, (item) => item.verboseName);
}}
.selected=${(item: ServiceConnection, items: ServiceConnection[]): boolean => {
let selected = this.instance?.serviceConnection === sc.pk;
let selected = this.instance?.serviceConnection === item.pk;
if (items.length === 1 && !this.instance) {
selected = true;
}