diff --git a/GeoffreyApp/api/commands.py b/GeoffreyApp/api/commands.py index 8ca13cc..c0ea70c 100644 --- a/GeoffreyApp/api/commands.py +++ b/GeoffreyApp/api/commands.py @@ -772,8 +772,7 @@ def add_resident(new_resident_name, town_name, discord_uuid=None, mc_uuid=None): town = get_location(owner, town_name, Town) - if town.residents.filter(Q(town__owner__name__iexact=new_resident_name) | - Q(name__iexact=new_resident_name)).all().count(): + if town.residents.filter(id=new_resident.id).exists() | town.owner.filter(id=new_resident.id).exists(): raise IsResidentError town.residents.add(new_resident)