Skip to content

Commit

Permalink
VCST-839: fix: Make ImageUrl exportable (#722)
Browse files Browse the repository at this point in the history
fix: Make ImageUrl exportable
  • Loading branch information
artem-dudarev committed Mar 26, 2024
1 parent 452d21f commit 1b14a9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public virtual ExportableProduct FromModel(CatalogProduct source)
EndDate = source.EndDate;
Priority = source.Priority;
OuterId = source.OuterId;
ImageUrl = source.ImgSrc;

Images = source.Images?.Select(x => x.Clone() as Image).ToList();
Assets = source.Assets?.Select(x => x.Clone() as Asset).ToList();
Expand Down Expand Up @@ -104,6 +105,7 @@ public virtual IExportable ToTabular()
result.EndDate = EndDate;
result.Priority = Priority;
result.OuterId = OuterId;
result.ImageUrl = ImageUrl;

return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public class TabularProduct : IExportable

public string OuterId { get; set; }

public string ImageUrl { get; set; }


public object Clone()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ protected virtual IEnumerable<IExportable> ToExportable(IEnumerable<ICloneable>
var exportableProducts = models.Select(x =>
{
var exportableProduct = AbstractTypeFactory<ExportableProduct>.TryCreateInstance().FromModel(x);
exportableProduct.ImageUrl = x.ImgSrc;
return exportableProduct;
});

Expand Down

0 comments on commit 1b14a9a

Please sign in to comment.