Skip to content

Commit

Permalink
fix_locations create/update
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Dec 4, 2019
1 parent a9e6329 commit 78be7b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etools/libraries/locations/task_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 78be7b2

Please sign in to comment.