diff --git a/src/etools/libraries/locations/task_utils.py b/src/etools/libraries/locations/task_utils.py index 25aa763a64..503410b9c1 100644 --- a/src/etools/libraries/locations/task_utils.py +++ b/src/etools/libraries/locations/task_utils.py @@ -268,7 +268,7 @@ def create_location(pcode, carto_table, parent, parent_instance, site_name, row, try: # TODO: revisit this, maybe include (location name?) carto_table in the check # see below at update branch - names can be updated for existing locations with the same code - location = Location.objects.all_locations().get(p_code=pcode) + location = Location.objects.get(p_code=pcode) except Location.MultipleObjectsReturned: logger.warning("Multiple locations found for: {}, {} ({})".format(