diff --git a/Passepartout/Library/Sources/AppLibrary/Business/ProfileManager.swift b/Passepartout/Library/Sources/AppLibrary/Business/ProfileManager.swift index 7083208d..40ac72cf 100644 --- a/Passepartout/Library/Sources/AppLibrary/Business/ProfileManager.swift +++ b/Passepartout/Library/Sources/AppLibrary/Business/ProfileManager.swift @@ -120,7 +120,8 @@ extension ProfileManager { public func save(_ profile: Profile, isShared: Bool? = nil) async throws { pp_log(.app, .notice, "Save profile \(profile.id)...") do { - if let existingProfile = allProfiles[profile.id], profile != existingProfile { + let existingProfile = allProfiles[profile.id] + if existingProfile == nil || profile != existingProfile { try await beforeSave?(profile) try await repository.saveEntities([profile])