Skip to content

Commit

Permalink
fix a bug in load
Browse files Browse the repository at this point in the history
  • Loading branch information
jkitchin committed Jun 19, 2024
1 parent 4679bf7 commit a6a0584
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycse/hashcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,11 @@ def load_data(self, hsh):
"""
with self.con:
cur = self.con.execute("SELECT value FROM cache WHERE hash = ?", (hsh,))
(value,) = cur.fetchone()
value = cur.fetchone()
if value is None:
return False, None
else:
return True, orjson.loads(value)
return True, orjson.loads(value[0])["output"]

@staticmethod
def search(query, *args):
Expand Down

0 comments on commit a6a0584

Please sign in to comment.