import-export inbound #1300

This commit is contained in:
Alireza Ahmadi
2023-12-08 20:08:44 +01:00
parent 38013e5ea9
commit 35feef650f
11 changed files with 91 additions and 4 deletions

View File

@@ -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