Allow get_comments to create the database.

This was false because prior to Pushshift, commentaugment worked by
reading the comments tree on every submission, and thus couldn't be
done first. Now, I think there's nothing wrong with getting comments
before submissions.
master
Ethan Dalool 2020-05-12 18:19:46 -07:00
parent a56451108d
commit 10699893ea
1 changed files with 2 additions and 2 deletions

View File

@ -28,10 +28,10 @@ def get_comments(
database.insert(specific_submission)
elif subreddit:
(database, subreddit) = tsdb.TSDB.for_subreddit(subreddit, do_create=False, fix_name=True)
(database, subreddit) = tsdb.TSDB.for_subreddit(subreddit, do_create=True, fix_name=True)
else:
(database, username) = tsdb.TSDB.for_user(username, do_create=False, fix_name=True)
(database, username) = tsdb.TSDB.for_user(username, do_create=True, fix_name=True)
cur = database.sql.cursor()