Skip to content

Commit

Permalink
Set FileScanResult to Clean in localtest. (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarne authored May 13, 2024
1 parent 69deb8d commit 9323f0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Controllers/Storage/DataController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ public async Task<ActionResult<DataElement>> CreateAndUploadData(
Stream theStream = streamAndDataElement.Stream;
DataElement newData = streamAndDataElement.DataElement;

#if LOCALTEST
newData.FileScanResult = dataTypeDefinition.EnableFileScan ? FileScanResult.Clean : FileScanResult.NotApplicable;
#else
newData.FileScanResult = dataTypeDefinition.EnableFileScan ? FileScanResult.Pending : FileScanResult.NotApplicable;
#endif

if (theStream == null)
{
Expand Down Expand Up @@ -404,7 +408,11 @@ public async Task<ActionResult<DataElement>> OverwriteData(

if (blobSize > 0)
{
#if LOCALTEST
FileScanResult scanResult = dataTypeDefinition.EnableFileScan ? FileScanResult.Clean : FileScanResult.NotApplicable;
#else
FileScanResult scanResult = dataTypeDefinition.EnableFileScan ? FileScanResult.Pending : FileScanResult.NotApplicable;
#endif

updatedProperties.Add("/fileScanResult", scanResult);

Expand Down

0 comments on commit 9323f0b

Please sign in to comment.