Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
simpat-adam committed Jul 17, 2024
1 parent 96c5d1f commit e32144e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/EdFi.DataManagementService.Core/ApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,11 @@ public JsonArray GetDependencies()
Dictionary<string, List<string>> dependencies =
resourceSchemas.ToDictionary(rs => rs.Value!["resourceName"]!.GetValue<string>(), rs => new List<string>());

foreach (var resourceSchema in resourceSchemas!.Select(rs => rs.Value))
foreach (var resourceSchema in resourceSchemas.Select(rs => rs.Value))
{
var resourceSchemaJsonObject = resourceSchema;
var documentPathsMappingObj = resourceSchemaJsonObject?["documentPathsMapping"]?.AsObject();
Trace.Assert(resourceSchemaJsonObject != null, nameof(resourceSchemaJsonObject) + " != null");
var documentPathsMappingObj = resourceSchemaJsonObject["documentPathsMapping"]?.AsObject();
if (documentPathsMappingObj != null)
{
var references = documentPathsMappingObj.Select(dmo => dmo.Value?.AsObject()).Where(o =>
Expand All @@ -314,7 +315,7 @@ public JsonArray GetDependencies()

foreach (var reference in references)
{
dependencies[resourceSchemaJsonObject!["resourceName"]!.GetValue<string>()].Add(reference!["resourceName"]!.GetValue<string>());
dependencies[resourceSchemaJsonObject["resourceName"]!.GetValue<string>()].Add(reference!["resourceName"]!.GetValue<string>());
}
}
}
Expand Down

0 comments on commit e32144e

Please sign in to comment.