Skip to content
Snippets Groups Projects
Verified Commit bbb7e24b authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Fix listing creation on importing additional waypoints.

parent 123e6059
No related branches found
No related tags found
No related merge requests found
......@@ -123,9 +123,9 @@ class GpxImporter(object):
if not parent_waypoint:
logger.info('Creating new master waypoint and listing for %s' % parent_code)
parent_waypoint = Waypoint(code=parent_code)
parent_listing = parent_waypoint.listing
if not parent_listing:
parent_listing = Listing(master_waypoint=parent_waypoint, waypoints=[parent_waypoint])
else:
parent_listing = parent_waypoint.listing
# Add waypoint
logger.info('Linking %s to %s' % (waypoint.code, parent_code))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment