Fix config info loss when renaming a tunnel. (#1254)

This migrates data to the new tunnel when renaming, such as: Description, OverridePeerSettings, PeerGroups, PeerHistoricalEndpointTracking, PeerTrafficTracking.
pull/1247/head
freetushkan 2026-04-30 17:23:47 +03:00 committed by GitHub
parent 930c4169c5
commit d3d7c7e678
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1085,6 +1085,11 @@ class WireguardConfiguration:
doRenameStatement("_restrict_access")
doRenameStatement("_deleted")
doRenameStatement("_transfer")
conn.execute(
self.infoTable.update()
.where(self.infoTable.c.ID == self.Name)
.values(ID=newConfigurationName)
)
self.AllPeerJobs.updateJobConfigurationName(self.Name, newConfigurationName)
shutil.copy(