diff --git a/vendor/registrasion/registrasion/views.py b/vendor/registrasion/registrasion/views.py index b6d05af0..c3fdb1e7 100644 --- a/vendor/registrasion/registrasion/views.py +++ b/vendor/registrasion/registrasion/views.py @@ -1116,8 +1116,11 @@ def _get_badge_template_name(): @login_required def user_badge(request, format="png"): '''Shows the logged-in user their badge''' - - return render_badge(request.user, format) + if waffle.flag_is_active("force_badge_overlay"): + overlay=True + else: + overlay=False + return render_badge(request.user, format, overlay) @user_passes_test(_staff_only) def badge(request, user_id, format="png"): @@ -1147,6 +1150,8 @@ def _convert_img(img, outformat="png",dpi=200,width=None): return out def render_badge(user, format="png", overlay=False): + if waffle.flag_is_active("force_badge_overlay"): + overlay=True rendered = render_badge_svg(user, overlay=overlay) if format == "png": rendered = _convert_img(rendered, outformat="png")