From 806429d3f54a5d0c105c1779b44e380b99b8c659 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 3 Sep 2022 06:25:38 -0700 Subject: [PATCH] Fix column name of edited text. Why didn't this error before? I shudder to think. --- timesearch_modules/tsdb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/timesearch_modules/tsdb.py b/timesearch_modules/tsdb.py index 97bb54e..b45f014 100644 --- a/timesearch_modules/tsdb.py +++ b/timesearch_modules/tsdb.py @@ -362,8 +362,10 @@ class TSDB: ''' if isinstance(obj, SUBMISSION_TYPES): table = 'submission_edits' + key = 'previous_selftext' else: table = 'comment_edits' + key = 'previous_body' if obj.edited is False: replaced_at = int(time.time()) @@ -372,7 +374,7 @@ class TSDB: postdata = { 'idstr': obj.fullname, - 'text': old_text, + key: old_text, 'replaced_at': replaced_at, } cur = self.sql.cursor()