Skip to content

Commit

Permalink
Fix incorrect casing
Browse files Browse the repository at this point in the history
  • Loading branch information
timbeccue committed Dec 4, 2024
1 parent 71eb76d commit 3c3a334
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion import_schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def clear_old_schedule(site, cutoff_time=None):
query = calendar_table.query(
IndexName=index_name,
KeyConditionExpression=Key('site').eq(site) & Key('end').gt(cutoff_time),
FilterExpression=Attr('origin').eq('lco') & Attr('start').gt(cutoff_time)
FilterExpression=Attr('origin').eq('LCO') & Attr('start').gt(cutoff_time)
)
items = query.get('Items', [])
print(f"Removing expired scheduled events: {items}")
Expand Down
3 changes: 1 addition & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def get_project(project_name, created_at):

def delete_calendar_event(event_id, start_time, user_making_request=None, requester_is_admin=True):
"""Deletes an event from the DynamoDB table with optional authorization check."""

try:
# Perform the delete operation
response = calendar_table.delete_item(
Expand All @@ -142,7 +141,7 @@ def delete_calendar_event(event_id, start_time, user_making_request=None, reques
ExpressionAttributeValues = {
":requester_id": user_making_request,
":requesterIsAdmin": requester_is_admin,
":true": "true"
":true": True
}
)
return response # Return the raw response data (typically including `Item` if success)
Expand Down

0 comments on commit 3c3a334

Please sign in to comment.