Skip to content

Commit

Permalink
When using LoadListDataAsStreamAsync to load list items number column…
Browse files Browse the repository at this point in the history
…s without a value set where returned as value 0 whereas they should have been returned as null #751
  • Loading branch information
jansenbe committed Feb 4, 2022
1 parent 78a4acf commit c7361d8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- ExecuteAsync(throwOnError:false) is ignored during listitem handling code that processed the list item response #741 [jansenbe - Bert Jansen]
- GetPagesAsync fails with pageHeader translateX or translateY as nulls - additional checks added #740 [jansenbe - Bert Jansen]
- Blazor WASM cannot download files using the download.aspx page due to CORS limitations #736 [jansenbe - Bert Jansen]
- When using LoadListDataAsStreamAsync to load list items number columns without a value set where returned as value 0 whereas they should have been returned as null #751 [jansenbe - Bert Jansen]

## [1.5.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,15 @@ private static object GetJsonPropertyValue(JsonElement propertyValue, FieldType
}
else
{
return 0;
// When there's no value then return null
if (propertyValue.ValueKind == JsonValueKind.String && string.IsNullOrEmpty(propertyValue.GetString()))
{
return null;
}
else
{
return 0;
}
}
}
else
Expand All @@ -610,7 +618,15 @@ private static object GetJsonPropertyValue(JsonElement propertyValue, FieldType
}
else
{
return 0.0d;
// When there's no value return null
if (propertyValue.ValueKind == JsonValueKind.String && string.IsNullOrEmpty(propertyValue.GetString()))
{
return null;
}
else
{
return 0.0d;
}
}
}
else
Expand Down Expand Up @@ -654,8 +670,12 @@ private static object GetJsonPropertyValue(JsonElement propertyValue, FieldType
}
}
}
else
{
return null;
}
}
return 0.0d;
return null;
}
default:
{
Expand Down

0 comments on commit c7361d8

Please sign in to comment.