fix: ensure executionRequestModel is a copy to avoid modifying the original request model

This commit is contained in:
Udhay-Adithya
2025-07-02 13:39:12 +05:30
parent a88a5d7629
commit fe6720f4c7

View File

@@ -281,11 +281,11 @@ class CollectionStateNotifier
return; return;
} }
RequestModel executionRequestModel = requestModel!; RequestModel executionRequestModel = requestModel!.copyWith();
if (!requestModel.preRequestScript.isNullOrEmpty()) { if (!requestModel.preRequestScript.isNullOrEmpty()) {
executionRequestModel = await handlePreRequestScript( executionRequestModel = await handlePreRequestScript(
requestModel, executionRequestModel,
originalEnvironmentModel, originalEnvironmentModel,
(envModel, updatedValues) { (envModel, updatedValues) {
ref ref