Fixed default profile creation

Don't allow dropping a folder into itself
This commit is contained in:
Robert committed 2019-11-25 19:27:55 +01:00
1 parent 602a0e6fee
commit 3084869d75
9 files changed
+49 -34

No files matched your search

@@ -69,7 +69,8 @@ namespace Artemis.Core.Services.Storage
if (module.ActiveProfile != null)
return module.ActiveProfile;
var profileEntity = _profileRepository.GetByPluginGuid(module.PluginInfo.Guid).FirstOrDefault(p => p.IsActive);
var moduleProfiles = _profileRepository.GetByPluginGuid(module.PluginInfo.Guid);
var profileEntity = moduleProfiles.FirstOrDefault(p => p.IsActive) ?? moduleProfiles.FirstOrDefault();
if (profileEntity == null)
return null;