diff --git a/PassepartoutCore/Sources/PassepartoutProviders/Repositories/InfrastructureRepository.swift b/PassepartoutCore/Sources/PassepartoutProviders/Repositories/InfrastructureRepository.swift index d5f9eaed..14780b1e 100644 --- a/PassepartoutCore/Sources/PassepartoutProviders/Repositories/InfrastructureRepository.swift +++ b/PassepartoutCore/Sources/PassepartoutProviders/Repositories/InfrastructureRepository.swift @@ -55,6 +55,8 @@ class InfrastructureRepository: Repository { infrastructure.name, vpnProtocol.rawValue ) + let existing = try context.fetch(request) + existing.forEach(context.delete) let dto = InfrastructureMapper( context,