Changeset 1358
- Timestamp:
- 08/15/08 19:39:21 (4 months ago)
- Files:
-
- PleiadesEntity/trunk/Extensions/loader.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesEntity/trunk/Extensions/loader.py
r1356 r1358 430 430 p = places[pid] 431 431 432 fids = [] 432 433 # Iterate over locations 433 434 for lid in lids: … … 444 445 parse_secondary_references(root, f, ptool) #, wftool) 445 446 p.addReference(f, 'hasFeature') 447 fids.append(fid) 446 448 else: 447 449 for i, nid in enumerate(nids): … … 459 461 parse_secondary_references(root, f, ptool) #, wftool) 460 462 p.addReference(f, 'hasFeature') 461 463 fids.append(fid) 462 464 # If there are no locations, iterate over the names 463 465 if len(lids) == 0: … … 473 475 parse_secondary_references(root, f, ptool) #, wftool) 474 476 p.addReference(f, 'hasFeature') 475 477 fids.append(fid) 476 478 except: 477 479 savepoint.rollback() … … 479 481 480 482 transaction.commit() 481 return {'place_id': pid, 'location_ids': lids, 'name_ids': nids} 482 483 return dict(place_id=pid, feature_ids=fids, location_ids=lids, name_ids=nids)
