mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-21 16:33:28 +08:00
loadbalancers: exclude pending_deleted when checking uniqueness
This commit is contained in:
@@ -43,6 +43,7 @@ type SLoadbalancerListenerRule struct {
|
||||
|
||||
func loadbalancerListenerRuleCheckUniqueness(ctx context.Context, lbls *SLoadbalancerListener, domain, path string) error {
|
||||
q := LoadbalancerListenerRuleManager.Query().
|
||||
IsFalse("pending_deleted").
|
||||
Equals("listener_id", lbls.Id).
|
||||
Equals("domain", domain).
|
||||
Equals("path", path)
|
||||
|
||||
@@ -104,6 +104,7 @@ type SLoadbalancerListener struct {
|
||||
|
||||
func (man *SLoadbalancerListenerManager) checkListenerUniqueness(ctx context.Context, lb *SLoadbalancer, listenerType string, listenerPort int64) error {
|
||||
q := man.Query().
|
||||
IsFalse("pending_deleted").
|
||||
Equals("loadbalancer_id", lb.Id).
|
||||
Equals("listener_port", listenerPort)
|
||||
switch listenerType {
|
||||
|
||||
Reference in New Issue
Block a user