From 507b742b972413e323dc04cea0d5d4faa355f863 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 13 Aug 2021 20:55:59 +0200 Subject: [PATCH] fddf --- files/helpers/jinja2.py | 5 ++--- files/templates/submission.html | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index 46eb6a7e7..c9c21ffa4 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -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) \ No newline at end of file + return render_template("submission_listing.html", listing=[p], v=v) \ No newline at end of file diff --git a/files/templates/submission.html b/files/templates/submission.html index 38616dc7b..1fb37df69 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -308,7 +308,7 @@
- {{ p.embed_url | post_embed | safe }} + {{ p.embed_url | post_embed(v) | safe }}