Change action to compare with strings

develop
Etzelia 2019-09-25 22:03:13 +02:00
parent 47c0a7c605
commit 02d14bc394
1 changed files with 3 additions and 3 deletions

View File

@ -310,15 +310,15 @@ class GUIResult(models.Model):
@property @property
def display_action(self): def display_action(self):
if self.type == "block": 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": if self.type == "chat":
return "Chat" return "Chat"
if self.type == "container": 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": if self.type == "command":
return "Command" return "Command"
if self.type == "session": if self.type == "session":
return "Logout" if self.action == 0 else "Login" return "Logout" if self.action == "0" else "Login"
if self.type == "sign": if self.type == "sign":
return "Sign" return "Sign"
return self.action return self.action