From bad0bf140914062b4f0a9a7924c47afb8cd110ed Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 23 Oct 2020 06:47:38 -0700 Subject: [PATCH] Name sheet based on puzzle name, not puzzle channel ID We don't have the same restrictions on the sheet name that we have on the channel name, so let the original name go through. --- turbot/events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/turbot/events.py b/turbot/events.py index 7a8654e..feb0514 100644 --- a/turbot/events.py +++ b/turbot/events.py @@ -246,7 +246,7 @@ def puzzle_channel_created(turb, puzzle_channel_name, puzzle_channel_id): puzzle_table.put_item(Item=item) # Create a sheet for the puzzle - sheet = turbot.sheets.sheets_create_for_puzzle(turb, puzzle_channel_name) + sheet = turbot.sheets.sheets_create_for_puzzle(turb, item['name']) # Update the database with the URL of the sheet item['sheet_url'] = sheet['url'] @@ -255,6 +255,7 @@ def puzzle_channel_created(turb, puzzle_channel_name, puzzle_channel_id): # Get the new sheet_url into the channel description set_channel_description(turb, item) + # Finally, lookup and invite all users from this hunt to this new puzzle hunts_table = turb.db.Table('hunts') response = hunts_table.scan( FilterExpression='hunt_id = :hunt_id', -- 2.45.2