Skip to content

Commit

Permalink
Unexpected parallel errors just ignore it now
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Jun 1, 2024
1 parent 95fecbd commit 3a42adb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Rappen.XRM.Helpers/Extensions/MetadataExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,20 @@ public static EntityMetadata GetEntity(this IOrganizationService service, string
if (!entities.TryGetValue(service, out var serviceEntities))
{
serviceEntities = new Dictionary<string, EntityMetadata>();
entities.Add(service, serviceEntities);
try
{
entities.Add(service, serviceEntities);
}
catch { }
}

if (!serviceEntities.ContainsKey(entity) && LoadEntityDetails(service, entity) is EntityMetadata e)
{
serviceEntities.Add(entity, e);
try
{
serviceEntities.Add(entity, e);
}
catch { }
}
if (serviceEntities.TryGetValue(entity, out EntityMetadata meta))
{
Expand Down

0 comments on commit 3a42adb

Please sign in to comment.