incusd/network/ovn: Skip empty transactions in SetChassisGroupPriority

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber 2026-07-31 17:32:46 -04:00
parent 54d230183c
commit 066ef03eb9
No known key found for this signature in database
GPG Key ID: C638974D64792D67

View File

@ -2765,6 +2765,11 @@ func (o *NB) SetChassisGroupPriority(ctx context.Context, haChassisGroupName OVN
operations = append(operations, updateOps...) operations = append(operations, updateOps...)
} }
// Skip the transaction if nothing changed.
if len(operations) == 0 {
return nil
}
// Apply the changes. // Apply the changes.
resp, err := o.client.Transact(ctx, operations...) resp, err := o.client.Transact(ctx, operations...)
if err != nil { if err != nil {