mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-16 15:17:14 +00:00
fix(clients): preserve enable on portable import (#6481)
* fix(clients): preserve enable on portable import Stop BulkCreate and orphan ImportClients from forcing enable=true, and restate Enable=false after GORM Create (clients.enable default:true drops the zero value). Interactive Create still defaults new clients to enabled. Fixes #6478. * fix(clients): respect enable=false on node mirror; omit enable defaults true --------- Co-authored-by: mrchatam <287639636+mrchatam@users.noreply.github.com>
This commit is contained in:
@@ -617,6 +617,12 @@ func (s *ClientService) AddInboundClient(inboundSvc *InboundService, data *model
|
||||
push = false
|
||||
}
|
||||
for _, client := range clients {
|
||||
// /clients/add on the node historically coerced enable=true; skip live
|
||||
// push for disabled clients and leave dirty so reconcile converges.
|
||||
if !client.Enable {
|
||||
push = false
|
||||
continue
|
||||
}
|
||||
if push {
|
||||
ctx, cancel := nodePushContext()
|
||||
err1 := rt.AddClient(ctx, oldInbound, client)
|
||||
|
||||
Reference in New Issue
Block a user