fixing expectation

This commit is contained in:
Chunxue Yang 2020-07-28 13:43:56 -07:00
parent 6738087a8f
commit 38cef8963a

View file

@ -141,7 +141,9 @@ public class LeaseSerializer implements ILeaseSerializer<Lease> {
public Map<String, ExpectedAttributeValue> getDynamoExistantExpectation(final String leaseKey) {
Map<String, ExpectedAttributeValue> result = new HashMap<>();
ExpectedAttributeValue expectedAV = new ExpectedAttributeValue(DynamoUtils.createAttributeValue(leaseKey));
ExpectedAttributeValue expectedAV = new ExpectedAttributeValue();
expectedAV.setValue(DynamoUtils.createAttributeValue(leaseKey));
expectedAV.setExists(true);
result.put(LEASE_KEY_KEY, expectedAV);
return result;