Merge pull request #53 from aj-m/m49-post-submission-fix
chore: strip references to 'new' prop from submissions
This commit is contained in:
commit
97eb828b30
2 changed files with 2 additions and 4 deletions
|
@ -1016,7 +1016,6 @@ def submit_post(v, sub=None):
|
|||
club=club,
|
||||
author_id=v.id,
|
||||
over_18=bool(request.values.get("over_18","")),
|
||||
new=True, # always sort as new by default
|
||||
app_id=v.client.application.id if v.client else None,
|
||||
is_bot = is_bot,
|
||||
url=url,
|
||||
|
@ -1186,7 +1185,7 @@ def submit_post(v, sub=None):
|
|||
if request.headers.get("Authorization"): return post.json
|
||||
else:
|
||||
post.voted = 1
|
||||
if post.new or 'megathread' in post.title.lower(): sort = 'new'
|
||||
if 'megathread' in post.title.lower(): sort = 'new'
|
||||
else: sort = v.defaultsortingcomments
|
||||
return render_template('submission.html', v=v, p=post, sort=sort, render_replies=True, offset=0, success=True, sub=post.subr)
|
||||
|
||||
|
|
|
@ -99,8 +99,7 @@ CREATE TABLE public.submissions (
|
|||
flair character varying(350),
|
||||
stickied_utc integer,
|
||||
ghost boolean DEFAULT false NOT NULL,
|
||||
sub character varying(20),
|
||||
new boolean
|
||||
sub character varying(20)
|
||||
);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue