Submission wizard - Added adaption hint and entry details steps

This commit is contained in:
Robert committed 2023-08-11 14:43:35 +02:00
1 parent d2b8123a30
commit e1f0ccbcc1
16 files changed
+195 -30

No files matched your search

@@ -363,14 +363,24 @@ internal class ProfileService : IProfileService
_logger.Debug("Updating profile - Saving {Profile}", profile);
profile.Save();
if (includeChildren)
{
foreach (RenderProfileElement child in profile.GetAllRenderElements())
child.Save();
}
// At this point the user made actual changes, save that
profile.IsFreshImport = false;
profile.ProfileEntity.IsFreshImport = false;
_profileRepository.Save(profile.ProfileEntity);
// If the provided profile is external (cloned or from the workshop?) but it is loaded locally too, reload the local instance
// A bit dodge but it ensures local instances always represent the latest stored version
ProfileConfiguration? localInstance = ProfileConfigurations.FirstOrDefault(p => p.Profile != null && p.Profile != profile && p.ProfileId == profile.ProfileEntity.Id);
if (localInstance == null)
return;
DeactivateProfile(localInstance);
ActivateProfile(localInstance);
}
/// <inheritdoc />