This commit is contained in:
Aevann1 2021-08-13 20:55:59 +02:00
parent ca17f0da6b
commit bfefd3b22d
2 changed files with 3 additions and 4 deletions

View file

@ -13,12 +13,11 @@ def app_config(x):
return app.config.get(x)
@app.template_filter("post_embed")
def post_embed(id):
def post_embed(id, v):
try: id = int(id)
except: return None
p = get_post(id, graceful=True)
if hasattr(g, 'v') and g.v: return render_template("submission_listing.html", listing=[p], v=g.v)
else: return render_template("submission_listing.html", listing=[p], postembed=True)
return render_template("submission_listing.html", listing=[p], v=v)