add freeze subscription
This commit is contained in:
@@ -42,15 +42,6 @@ def add(
|
||||
cond_expr='attribute_exists(sk)',
|
||||
exc_cls=OrgNotFoundError,
|
||||
)
|
||||
transact.put(
|
||||
item={
|
||||
'id': 'SUBSCRIPTION',
|
||||
'sk': f'ORG#{org_id}',
|
||||
'name': name,
|
||||
'created_at': now_,
|
||||
},
|
||||
cond_expr='attribute_not_exists(sk)',
|
||||
)
|
||||
transact.put(
|
||||
item={
|
||||
'id': org_id,
|
||||
@@ -60,5 +51,14 @@ def add(
|
||||
'created_at': now_,
|
||||
}
|
||||
)
|
||||
transact.put(
|
||||
item={
|
||||
'id': 'SUBSCRIPTION',
|
||||
'sk': f'ORG#{org_id}',
|
||||
'name': name,
|
||||
'created_at': now_,
|
||||
},
|
||||
cond_expr='attribute_not_exists(sk)',
|
||||
)
|
||||
|
||||
return JSONResponse(status_code=HTTPStatus.CREATED)
|
||||
|
||||
Reference in New Issue
Block a user