Skip to content

Commit

Permalink
fix null content
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Sep 22, 2023
1 parent 6b17309 commit f6953f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Stars.Data/ThirdParty/Publication/GeosquareService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public async Task PrepareAtomItem(AtomItem atomItem, GeosquarePublicationState g
{
var xml = extension.GetReader().ReadOuterXml();
var offering = OwcContextHelper.OwcOfferingSerializer.Deserialize(new System.IO.StringReader(xml)) as OwcOffering;
if ( offering == null ) continue;
if (offering == null || offering.Contents == null) continue;
atomItem.ElementExtensions.Remove(extension);
foreach (var content in offering.Contents)
{
Expand All @@ -225,7 +225,7 @@ public async Task PrepareAtomItem(AtomItem atomItem, GeosquarePublicationState g
atomItem.ElementExtensions.Add(offering.CreateReader());
}
}

atomItem.ElementExtensions.ReadElementExtensions<OwcOffering>("offering", OwcNamespaces.Owc, new System.Xml.Serialization.XmlSerializer(typeof(OwcOffering)));


Expand Down

0 comments on commit f6953f4

Please sign in to comment.