Skip to content

Commit

Permalink
#1767 Update DimSeedDataGenerator.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBlaa authored Aug 2, 2024
1 parent bf82dce commit 6584e56
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Console/BExIS.Web.Shell/Areas/DIM/Helpers/DimSeedDataGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,17 @@ private void createDataCiteMappingConcept()
using (var conceptManager = new ConceptManager())
{
MappingConcept mappingConcept;
try
{
mappingConcept = conceptManager.FindByName("datacite");

}
catch (Exception e)
{
mappingConcept = conceptManager.CreateMappingConcept("datacite", "The concept for DIO management at DataCite.", "https://schema.datacite.org/meta/kernel-4.5/", "");
}
try
{
mappingConcept = conceptManager.FindByName("datacite");
if(mappingConcept == null)
mappingConcept = conceptManager.CreateMappingConcept("datacite", "The concept for DIO management at DataCite.", "https://schema.datacite.org/meta/kernel-4.5/", "");

}
catch (Exception e)
{
mappingConcept = conceptManager.CreateMappingConcept("datacite", "The concept for DIO management at DataCite.", "https://schema.datacite.org/meta/kernel-4.5/", "");
}

List<MappingKey> mappingKeys;
try
Expand Down Expand Up @@ -1999,4 +2001,4 @@ private bool Exist(string name, LinkElementType type)
return false;
}
}
}
}

0 comments on commit 6584e56

Please sign in to comment.