Fix column name of edited text.

Why didn't this error before? I shudder to think.
master
voussoir 2022-09-03 06:25:38 -07:00
parent d3154e7b51
commit 806429d3f5
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 3 additions and 1 deletions

View File

@ -362,8 +362,10 @@ class TSDB:
''' '''
if isinstance(obj, SUBMISSION_TYPES): if isinstance(obj, SUBMISSION_TYPES):
table = 'submission_edits' table = 'submission_edits'
key = 'previous_selftext'
else: else:
table = 'comment_edits' table = 'comment_edits'
key = 'previous_body'
if obj.edited is False: if obj.edited is False:
replaced_at = int(time.time()) replaced_at = int(time.time())
@ -372,7 +374,7 @@ class TSDB:
postdata = { postdata = {
'idstr': obj.fullname, 'idstr': obj.fullname,
'text': old_text, key: old_text,
'replaced_at': replaced_at, 'replaced_at': replaced_at,
} }
cur = self.sql.cursor() cur = self.sql.cursor()