Skip to content

Commit

Permalink
Handling localdatabase references when unpacking (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
NavneetThekkumpat authored Oct 19, 2022
1 parent 0675170 commit b5d3554
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/PAModel/Serializers/SourceSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -818,14 +818,11 @@ private static void LoadDataSources(CanvasDocument app, DirectoryReader director
localDatabaseReferenceJson.dataSources.Add(tableDef.EntityName, tableDef.LocalReferenceDSJson);
}
}
// Skip the data source references with empty data sources. This avoids data source reference with empty json for data sources

app._dataSourceReferences = new Dictionary<string, LocalDatabaseReferenceJson>();
foreach (var dataSourceReferenceEntry in dataSourceReferences)
{
if (dataSourceReferenceEntry.Value.dataSources.Count > 0)
{
app._dataSourceReferences.Add(dataSourceReferenceEntry);
}
app._dataSourceReferences.Add(dataSourceReferenceEntry);
}

// key is filename, value is stringified xml
Expand Down

0 comments on commit b5d3554

Please sign in to comment.