Fixed 'add_resident'
parent
02845efaf2
commit
6b210cf0de
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue