Skip to content

Commit

Permalink
Fixed bug where if RetrieveDateTimeInUtc was not set on the operation…
Browse files Browse the repository at this point in the history
… or context config the value was still defaulted to false.
  • Loading branch information
boblodgett committed Dec 16, 2024
1 parent 13af660 commit 942183d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/src/Services/DynamoDBv2/Custom/DataModel/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public DynamoDBFlatConfig(DynamoDBOperationConfig operationConfig, DynamoDBConte
bool consistentRead = operationConfig.ConsistentRead ?? contextConfig.ConsistentRead ?? false;
bool skipVersionCheck = operationConfig.SkipVersionCheck ?? contextConfig.SkipVersionCheck ?? false;
bool ignoreNullValues = operationConfig.IgnoreNullValues ?? contextConfig.IgnoreNullValues ?? false;
bool retrieveDateTimeInUtc = operationConfig.RetrieveDateTimeInUtc ?? contextConfig.RetrieveDateTimeInUtc ?? false;
bool retrieveDateTimeInUtc = operationConfig.RetrieveDateTimeInUtc ?? contextConfig.RetrieveDateTimeInUtc ?? true;
bool isEmptyStringValueEnabled = operationConfig.IsEmptyStringValueEnabled ?? contextConfig.IsEmptyStringValueEnabled ?? false;
DynamoDBEntryConversion conversion = operationConfig.Conversion ?? contextConfig.Conversion ?? DynamoDBEntryConversion.CurrentConversion;
string tableNamePrefix = operationConfig.TableNamePrefix ?? contextConfig.TableNamePrefix ?? string.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ private void TestHashObjects()
Assert.AreEqual(product.KeySizes.Count, retrieved.KeySizes.Count);
Assert.IsNotNull(retrieved.CompanyInfo);
Assert.AreEqual(product.CompanyInfo.Name, retrieved.CompanyInfo.Name);
Assert.AreEqual(product.CompanyInfo.Founded, retrieved.CompanyInfo.Founded);
Assert.AreEqual(product.CompanyInfo.Founded.ToUniversalTime(), retrieved.CompanyInfo.Founded);
Assert.AreNotEqual(product.CompanyInfo.Revenue, retrieved.CompanyInfo.Revenue);
Assert.AreEqual(product.CompanyInfo.AllProducts.Count, retrieved.CompanyInfo.AllProducts.Count);
Assert.AreEqual(product.CompanyInfo.AllProducts[0].Id, retrieved.CompanyInfo.AllProducts[0].Id);
Expand Down

0 comments on commit 942183d

Please sign in to comment.