]> git.cworth.org Git - turbot/blobdiff - turbot/interaction.py
Rename hunt_id_index to is_hunt_index
[turbot] / turbot / interaction.py
index bb4b868179863d259c53044c3789667c95548a71..06181887beb3f1c6632dda3f21607c88aa5e6b9c 100644 (file)
@@ -115,7 +115,7 @@ def new_hunt_submission(turb, payload, metadata):
                 {'AttributeName': 'PK', 'AttributeType': 'S'},
                 {'AttributeName': 'SK', 'AttributeType': 'S'},
                 {'AttributeName': 'channel_id', 'AttributeType': 'S'},
-                {'AttributeName': 'hunt_id', 'AttributeType': 'S'},
+                {'AttributeName': 'is_hunt', 'AttributeType': 'S'},
             ],
             ProvisionedThroughput={
                 'ReadCapacityUnits': 5,
@@ -136,9 +136,9 @@ def new_hunt_submission(turb, payload, metadata):
                     }
                 },
                 {
-                    'IndexName': 'hunt_id_index',
+                    'IndexName': 'is_hunt_index',
                     'KeySchema': [
-                        {'AttributeName': 'hunt_id', 'KeyType': 'HASH'}
+                        {'AttributeName': 'is_hunt', 'KeyType': 'HASH'}
                     ],
                     'Projection': {
                         'ProjectionType': 'ALL'
@@ -170,6 +170,7 @@ def new_hunt_submission(turb, payload, metadata):
     item={
         "PK": "hunt-{}".format(hunt_id),
         "SK": "hunt-{}".format(hunt_id),
+        "is_hunt": hunt_id,
         "hunt_id": hunt_id,
         "channel_id": channel_id,
         "active": False,