Receiving Object Reference error when updating variable set through the API. I’m including the version. This started occurring after updating to 2020.5.8.
System.NullReferenceException: Object reference not set to an instance of an object.
- at Octopus.Server.Web.Api.Actions.VariableSetUpdateAction.<>c__DisplayClass22_0.b__2(ReferenceDataItem e1) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Api\Actions\VariableSetUpdateAction.cs:line 283*
- at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source, Func
2 predicate)*
I did a GET on https://octopus.test.com/api/Spaces-1/variables/variableset-LibraryVariableSets-4
Took the response, made my change and PUT on https://octopus.test.com/api/Spaces-1/variables/variableset-LibraryVariableSets-4
{
"Id": "variableset-LibraryVariableSets-4",
"OwnerId": "LibraryVariableSets-4",
"Version": 2539,
"Variables": [
{
"Id": "123ABC",
"Name": "TestApiExternalRefreshToken",
"Value": "123",
"Description": null,
"Scope": {
"Machine": [
"Machines-602"
]
},
"IsEditable": true,
"Prompt": null,
"Type": "String",
"IsSensitive": false
}
]
}