From 78be7b23ca70c805aa262255ef944d44987e2b15 Mon Sep 17 00:00:00 2001 From: Domenico DiNicola Date: Wed, 4 Dec 2019 17:41:14 -0500 Subject: [PATCH] fix_locations create/update --- src/etools/libraries/locations/task_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(