Fix column name of edited text.
Why didn't this error before? I shudder to think.
This commit is contained in:
parent
d3154e7b51
commit
806429d3f5
1 changed files with 3 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue