Various command fixes

doc_update
Joey Hines 2019-09-26 10:22:55 -05:00
parent 6b210cf0de
commit 2c1c5d214f
1 changed files with 4 additions and 4 deletions

View File

@ -545,7 +545,7 @@ def edit_pos(x, z, loc_name, discord_uuid=None, mc_uuid=None):
:param loc_name: Location Name to edit :param loc_name: Location Name to edit
:param discord_uuid: Discord UUID :param discord_uuid: Discord UUID
:param mc_uuid: MC UUID :param mc_uuid: MC UUID
:return: Edited Locatio :return: Edited Location
:raises: :raises:
:raises: PlayerNotFound, LocationLookupError, EntryNameNotUniqueError, NoLocationsInDatabase :raises: PlayerNotFound, LocationLookupError, EntryNameNotUniqueError, NoLocationsInDatabase
:help: Edits the position of a location :help: Edits the position of a location
@ -643,7 +643,7 @@ def delete_item(item, shop_name=None, discord_uuid=None, mc_uuid=None):
@command(RequestTypes.POST) @command(RequestTypes.POST)
def delete_resource(resource_name, farm_name=None, discord_uuid=None, mc_uuid=None): def delete_resource(resource, farm_name=None, discord_uuid=None, mc_uuid=None):
""" """
:request: POST :request: POST
:param resource: resource to delete :param resource: resource to delete
@ -659,7 +659,7 @@ def delete_resource(resource_name, farm_name=None, discord_uuid=None, mc_uuid=No
farm = get_location(player, farm_name, PublicFarm) farm = get_location(player, farm_name, PublicFarm)
delete_list = Resource.objects.filter(resource_name=resource_name, farm=farm).all() delete_list = Resource.objects.filter(resource_name=resource, farm=farm).all()
if len(delete_list) == 0: if len(delete_list) == 0:
raise ResourceNotFoundError raise ResourceNotFoundError
@ -741,7 +741,7 @@ def add_owner(new_owner_name, location_name, discord_uuid=None, mc_uuid=None):
location = get_location(owner, location_name, Location) location = get_location(owner, location_name, Location)
if location.owner.filter(location__owner__name__iexact=new_owner_name): if location.owner.filter(id=new_owner.id):
raise IsOwnerError raise IsOwnerError
location.owner.add(new_owner) location.owner.add(new_owner)