From 24b9bc38271e58a9ddf0649c1013dea9e32cab99 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Mon, 25 Nov 2019 00:47:01 +0100
Subject: [PATCH] Fix Python 2 vs. 3.

---
 biscuit/core/templatetags/data_helpers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/biscuit/core/templatetags/data_helpers.py b/biscuit/core/templatetags/data_helpers.py
index 5267472ba..89b4e28fa 100644
--- a/biscuit/core/templatetags/data_helpers.py
+++ b/biscuit/core/templatetags/data_helpers.py
@@ -11,7 +11,7 @@ def get_dict(value: Any, arg: Any) -> Any:
 
     if hasattr(value, str(arg)):
         return getattr(value, arg)
-    elif hasattr(value, 'has_key') and value.has_key(arg):
+    elif hasattr(value, 'keys') and arg in value.keys():
         return value[arg]
     elif str(arg).isnumeric() and len(value) > int(arg):
         return value[int(arg)]
-- 
GitLab