fix referrer link in admin

master
alice 3 years ago
parent f75e6e218c
commit 64badf37d2

@ -43,14 +43,13 @@ class VPNUserInline(admin.StackedInline):
if not object.referrer: if not object.referrer:
return "-" return "-"
s = make_user_link(object.referrer) + " "
if object.referrer_used: if object.referrer_used:
s += _("(rewarded)") status = _("(rewarded)")
else: else:
s += _("(not rewarded)") status = _("(not rewarded)")
return s
return format_html("{} {}", make_user_link(object.referrer), status)
referrer_a.allow_tags = True
referrer_a.short_description = _("Referrer") referrer_a.short_description = _("Referrer")
def is_paid(self, object): def is_paid(self, object):

Loading…
Cancel
Save