From: Carl Worth Date: Thu, 31 Dec 2020 17:14:17 +0000 (-0700) Subject: Turbot home: Use recently added hunt_id_index to find existing hunts X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=6753c5a0ddf866153d1c1b95f079f85ea4da1705;p=turbot Turbot home: Use recently added hunt_id_index to find existing hunts This fixes the home view to correctly use the new single-table schema to find the list of available hunts. This view is now working to display the names of active hunts a user belongs to. (No puzzles are listed yet. That part of the home view still needs to be brought up to date with the latest schema.) --- diff --git a/turbot/events.py b/turbot/events.py index a118835..9439a23 100644 --- a/turbot/events.py +++ b/turbot/events.py @@ -77,7 +77,9 @@ def home(turb, user_id): # Behave cleanly if there is no "turbot" table at all yet. try: - response = turb.table.scan() + response = turb.table.scan( + IndexName="hunt_id_index", + ) hunts = response['Items'] except Exception: hunts = []