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,
|
club=club,
|
||||||
author_id=v.id,
|
author_id=v.id,
|
||||||
over_18=bool(request.values.get("over_18","")),
|
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,
|
app_id=v.client.application.id if v.client else None,
|
||||||
is_bot = is_bot,
|
is_bot = is_bot,
|
||||||
url=url,
|
url=url,
|
||||||
|
@ -1186,7 +1185,7 @@ def submit_post(v, sub=None):
|
||||||
if request.headers.get("Authorization"): return post.json
|
if request.headers.get("Authorization"): return post.json
|
||||||
else:
|
else:
|
||||||
post.voted = 1
|
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
|
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)
|
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),
|
flair character varying(350),
|
||||||
stickied_utc integer,
|
stickied_utc integer,
|
||||||
ghost boolean DEFAULT false NOT NULL,
|
ghost boolean DEFAULT false NOT NULL,
|
||||||
sub character varying(20),
|
sub character varying(20)
|
||||||
new boolean
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue