From 02d14bc39423b43c8e5e2702c280d36479a98ec4 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Wed, 25 Sep 2019 22:03:13 +0200 Subject: [PATCH] Change action to compare with strings --- models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models.py b/models.py index e50ec3b..2252b50 100644 --- a/models.py +++ b/models.py @@ -310,15 +310,15 @@ class GUIResult(models.Model): @property def display_action(self): if self.type == "block": - return "Block Break" if self.action == 0 else "Block Place" if self.action == 1 else "Interact/Used" + return "Block Break" if self.action == "0" else "Block Place" if self.action == "1" else "Interact/Used" if self.type == "chat": return "Chat" if self.type == "container": - return "Took from Container" if self.action == 0 else "Placed in Container" + return "Took from Container" if self.action == "0" else "Placed in Container" if self.type == "command": return "Command" if self.type == "session": - return "Logout" if self.action == 0 else "Login" + return "Logout" if self.action == "0" else "Login" if self.type == "sign": return "Sign" return self.action