From c6c61580620d25bef70e29868d97b5e421170fe2 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 21 Dec 2018 23:44:50 -0800 Subject: [PATCH] Save this assignment until it's needed. --- etiquette/photodb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etiquette/photodb.py b/etiquette/photodb.py index f4f114e..b249985 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -1414,11 +1414,11 @@ class PhotoDB( thing_table = thing_map['table'] thing_class = thing_map['class'] thing_cache = self.caches[thing_type] - thing_index = constants.SQL_INDEX[thing_table] if isinstance(db_row, dict): thing_id = db_row['id'] else: + thing_index = constants.SQL_INDEX[thing_table] thing_id = db_row[thing_index['id']] try: