diff options
| author | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-08 22:08:44 +0300 |
|---|---|---|
| committer | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-08 22:08:44 +0300 |
| commit | 35feef650f793ffbec2af51a18fd25d8b0beefb1 (patch) | |
| tree | f36cac6a4c188118418b53f45c681e7a4e821e6d /web/service | |
| parent | 38013e5ea942f35d7f187b476c2f8914281b6c18 (diff) | |
import-export inbound #1300
Diffstat (limited to 'web/service')
| -rw-r--r-- | web/service/inbound.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/service/inbound.go b/web/service/inbound.go index 73dd17e5..01d4eb57 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -168,9 +168,13 @@ func (s *InboundService) AddInbound(inbound *model.Inbound) (*model.Inbound, boo err = tx.Save(inbound).Error if err == nil { - for _, client := range clients { - s.AddClientStat(tx, inbound.Id, &client) + if len(inbound.ClientStats) == 0 { + for _, client := range clients { + s.AddClientStat(tx, inbound.Id, &client) + } } + } else { + return inbound, false, err } needRestart := false |
