continue
hunt_blocks += hunt_block(turb, hunt)
+ if len(hunt_blocks):
+ hunt_blocks = [
+ section_block(text_block("*Hunts you belong to*")),
+ divider_block(),
+ * hunt_blocks
+ ]
+ else:
+ hunt_blocks = [
+ section_block(text_block("You do not belong to any hunts"))
+ ]
+
return {
"type": "home",
"blocks": [
- section_block(text_block("*Hunts you belong to*")),
- divider_block(),
* hunt_blocks,
actions_block(button_block("New hunt", "new_hunt"))
]
# string and cleanly return (eliminating all future retries).
item['sheet_url'] = 'pending'
item['channel_url'] = channel_url(puzzle_channel_id)
- puzzle_table.put_item(Item=item)
+ turb.table.put_item(Item=item)
# Create a sheet for the puzzle
sheet = sheets_create_for_puzzle(turb, item)
# Update the database with the URL of the sheet
item['sheet_url'] = sheet['url']
- puzzle_table.put_item(Item=item)
+ turb.table.put_item(Item=item)
# Get the new sheet_url into the channel description
set_channel_description(turb, item)