web: fix minor issues

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-04 13:41:18 +02:00
parent b8c41f54c5
commit 67fef02d71
8 changed files with 747 additions and 600 deletions

View File

@ -64,6 +64,9 @@ export class PolicyBindingForm extends Form<PolicyBinding> {
target: this.targetPk || "",
}).then(bindings => {
const orders = bindings.results.map(binding => binding.order);
if (orders.length < 1) {
return 0;
}
return Math.max(...orders) + 1;
});
}