From: Carl Worth Date: Fri, 23 Oct 2020 13:47:38 +0000 (-0700) Subject: Name sheet based on puzzle name, not puzzle channel ID X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=bad0bf140914062b4f0a9a7924c47afb8cd110ed;p=turbot 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. --- 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',