fix retain key
This commit is contained in:
@@ -17,24 +17,24 @@ def update_policies(
|
||||
transact.put(
|
||||
item={
|
||||
'id': id,
|
||||
'sk': 'payment_policy',
|
||||
'sk': 'metadata#payment_policy',
|
||||
'create_date': now_,
|
||||
}
|
||||
| payment_policy
|
||||
)
|
||||
else:
|
||||
transact.delete(key=KeyPair(id, 'payment_policy'))
|
||||
transact.delete(key=KeyPair(id, 'metadata#payment_policy'))
|
||||
|
||||
if billing_policy:
|
||||
transact.put(
|
||||
item={
|
||||
'id': id,
|
||||
'sk': 'billing_policy',
|
||||
'sk': 'metadata#billing_policy',
|
||||
'create_date': now_,
|
||||
}
|
||||
| billing_policy
|
||||
)
|
||||
else:
|
||||
transact.delete(key=KeyPair(id, 'billing_policy'))
|
||||
transact.delete(key=KeyPair(id, 'metadata#billing_policy'))
|
||||
|
||||
return persistence_layer.transact_write_items(transact)
|
||||
|
||||
Reference in New Issue
Block a user