Check if `primary_location` is null in Player.json()

doc_update
Joey Hines 2020-10-10 12:14:02 -05:00
parent 1e0500d4df
commit 7d91f9e8a4
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class Player(models.Model):
return {"name": self.name,
"mc_uuid": self.mc_uuid,
"discord_uuid": self.discord_uuid,
"primary_location": self.primary_location.id
"primary_location": None if self.primary_location is None else self.primary_location.id
}
@property