Skip to content

Commit 9fa9097

Browse files
committed
update
1 parent 6702b00 commit 9fa9097

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3333,7 +3333,7 @@ private void CloseHomeWorkspace(object parameter)
33333333
if (!DynamoModel.IsTestMode && !HomeSpace.HasUnsavedChanges && (currentWorkspaceViewModel?.IsHomeSpace ?? true) && HomeSpace.HasRunWithoutCrash)
33343334
{
33353335
// Currently IsDNADataIngestionPipelineinBeta is set to true for debug builds and false for release builds. so we need to modify it here, when testing the pipeline in debug builds.
3336-
if (preferencesViewModel.IsMLAutocompleteTOUApproved && !IsDNADataIngestionPipelineinBeta && Model.CurrentWorkspace.IsValidForFDX && currentWorkspaceViewModel.Checksum != string.Empty)
3336+
if (!IsDNADataIngestionPipelineinBeta && Model.CurrentWorkspace.IsValidForFDX && currentWorkspaceViewModel.Checksum != string.Empty)
33373337
{
33383338
if (HasDifferentialCheckSum())
33393339
{

src/DynamoMLDataPipeline/DynamoMLDataPipeline.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,11 @@ void SendToMLDataPipeline(string filePath, RestClient client, string token)
296296

297297
public void SendWorkspaceLog(string filePath)
298298
{
299+
if (!DynamoModel.PreferenceSettings.IsMLAutocompleteTOUApproved)
300+
{
301+
throw new InvalidOperationException("User has opted out of data collection, this function shouldn't be called.");
302+
}
303+
299304
// Depending on whether we are using Stage or Prod, a token needs to be retrieved
300305
// using client and secret id from the app created in the respective environment.
301306
var token = GetAuthorizationToken();

0 commit comments

Comments
 (0)