Skip to content

Commit

Permalink
Merge pull request #2620 from unicef/feature/fix_locations
Browse files Browse the repository at this point in the history
fix_locations create/update
  • Loading branch information
ntrncic authored Dec 4, 2019
2 parents a9e6329 + 78be7b2 commit b9ed650
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 b9ed650

Please sign in to comment.