fix day
This commit is contained in:
@@ -46,21 +46,22 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
data = enrollment_layer.collection.get_items(
|
||||
TransactKey(enrollment_id) + SortKey('0') + SortKey('author')
|
||||
)
|
||||
created_at: datetime = fromisoformat(data['create_date']) # type: ignore
|
||||
|
||||
if not data:
|
||||
logger.debug('Enrollment not found')
|
||||
return False
|
||||
|
||||
logger.info('Enrollment found', data=data)
|
||||
|
||||
# Keep it until the migration has been completed
|
||||
old_course = _get_course(data['course']['id'])
|
||||
if old_course:
|
||||
data['course'] = old_course
|
||||
|
||||
created_at: datetime = fromisoformat(data['create_date']) # type: ignore
|
||||
start_date, end_date = get_billing_period(
|
||||
new_image['billing_day'],
|
||||
year=created_at.year,
|
||||
month=created_at.month,
|
||||
billing_day=new_image['billing_day'],
|
||||
date_=created_at,
|
||||
)
|
||||
pk = 'BILLING#ORG#{org_id}'.format(org_id=org_id)
|
||||
sk = 'START#{start}#END#{end}'.format(
|
||||
|
||||
Reference in New Issue
Block a user