From 9323f0bff2e33fa2b7d65e5c773e8e0ffd065aa6 Mon Sep 17 00:00:00 2001 From: Ivar Nesje Date: Mon, 13 May 2024 15:11:36 +0200 Subject: [PATCH] Set FileScanResult to Clean in localtest. (#98) --- src/Controllers/Storage/DataController.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Controllers/Storage/DataController.cs b/src/Controllers/Storage/DataController.cs index 88c164b6..7f0683ca 100644 --- a/src/Controllers/Storage/DataController.cs +++ b/src/Controllers/Storage/DataController.cs @@ -272,7 +272,11 @@ public async Task> 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) { @@ -404,7 +408,11 @@ public async Task> 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);