def gis_update_location_tree(feature, user_id=None):
 if user_id:
  auth.s3_impersonate(user_id)
 feature = json.loads(feature)
 path = gis.update_location_tree(feature)
 db.commit()
 return path

def gis_update_location_tree ( feature , user_id = None ) : if user_id : auth . s3_impersonate ( user_id ) feature = json . loads ( feature ) path = gis . update_location_tree ( feature ) db . commit ( ) return path
update the location tree for a feature - will normally be done asynchronously if there is a worker alive .