Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Added null check before getting download binary in GetDownloadById (#264)
SUNIL PARISI04033eb1ceda
diff --git a/src/Business/Grand.Business.Storage/Services/DownloadService.cs b/src/Business/Grand.Business.Storage/Services/DownloadService.csindex 68665c505..bf1ac6f70 100644--- a/src/Business/Grand.Business.Storage/Services/DownloadService.cs+++ b/src/Business/Grand.Business.Storage/Services/DownloadService.cs@@ -51,7 +51,7 @@ namespace Grand.Business.Storage.Servicesreturn null;var _download = await _downloadRepository.GetByIdAsync(downloadId);- if (!_download.UseDownloadUrl)+ if (_download != null && !_download.UseDownloadUrl)_download.DownloadBinary = await DownloadAsBytes(_download.DownloadObjectId);return _download;