diff --git a/services/project/backup.go b/services/project/backup.go index 0a56f7dd..b120919e 100644 --- a/services/project/backup.go +++ b/services/project/backup.go @@ -88,11 +88,29 @@ func (b *BackupDB) makeUniqueNames() { item.Name = name }) + makeUniqueNames(b.inventories, func(item *db.Inventory) string { + return item.Name + }, func(item *db.Inventory, name string) { + item.Name = name + }) + + makeUniqueNames(b.environments, func(item *db.Environment) string { + return item.Name + }, func(item *db.Environment, name string) { + item.Name = name + }) + makeUniqueNames(b.keys, func(item *db.AccessKey) string { return item.Name }, func(item *db.AccessKey, name string) { item.Name = name }) + + makeUniqueNames(b.views, func(item *db.View) string { + return item.Title + }, func(item *db.View, name string) { + item.Title = name + }) } func (b *BackupDB) new(projectID int, store db.Store) (*BackupDB, error) {