diff --git a/api/commands.py b/api/commands.py index f144b98..1a88c17 100644 --- a/api/commands.py +++ b/api/commands.py @@ -100,7 +100,7 @@ def register(player_name, discord_uuid): try: get_player(mc_uuid=mc_uuid) raise PlayerInDBError - except Player.DoesNotExist: + except PlayerNotFound: player = Player.objects.create(name=player_name, mc_uuid=mc_uuid, discord_uuid=discord_uuid) player.save() return player.json diff --git a/test/test_commands.py b/test/test_commands.py index 555c096..3868beb 100644 --- a/test/test_commands.py +++ b/test/test_commands.py @@ -107,7 +107,7 @@ class CommandsAPITestCase(TestCase): self.populate() location = info(location_name="test") - self.assertEqual(location["Name"], "test") + self.assertEqual(location["name"], "test") def test_tunnel(self): self.populate()