From 822fd6daac1f5a83477e62310ece3cbc437524dc Mon Sep 17 00:00:00 2001
From: Ole Laursen <olau@iola.dk>
Date: Wed, 20 Jun 2012 12:26:06 +0000
Subject: [PATCH] Replace get_profile() hack with a test on the user instead,
 this also makes the ballot icon more robust against users without profiles
 (which shouldn't happen, but apparently we sometimes get one which results in
 a crash rather than something more graceful)  - Legacy-Id: 4480

---
 ietf/idrfc/templatetags/ballot_icon.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ietf/idrfc/templatetags/ballot_icon.py b/ietf/idrfc/templatetags/ballot_icon.py
index 388eadb4d..3161ab897 100644
--- a/ietf/idrfc/templatetags/ballot_icon.py
+++ b/ietf/idrfc/templatetags/ballot_icon.py
@@ -101,7 +101,7 @@ def render_ballot_icon(user, doc):
 
         c = "position-%s" % (pos.pos.slug if pos else "norecord")
 
-        if hasattr(user, "get_profile") and ad == user.get_profile():
+        if ad.user_id == user.id:
             c += " my"
 
         res.append('<td class="%s" />' % c)