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
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