From 491f0d3180a15feec96c832e9acb75cc58f2c902 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Wed, 14 Apr 2010 06:00:58 +0000 Subject: [PATCH] Fixed the place detail missing because if place.main_loc in dump_places() was indented one too far. svn: r15111 --- src/plugins/webreport/NarrativeWeb.py | 44 ++++++++++++++------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index e19884387..721160d4e 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -1660,7 +1660,9 @@ class BasePage(object): return hyper def dump_place(self, place, table, gid): - """ dump a place from the database """ + """ + dump a place's information from within the database + """ if not self.noid and gid: trow = Html("tr") + ( @@ -1669,27 +1671,27 @@ class BasePage(object): ) table += trow - if place.main_loc: - ml = place.get_main_location() - if ml and not ml.is_empty(): - for val in [ - (LATITUDE, place.lat), - (LONGITUDE, place.long), - (STREET, ml.street), - (CITY, ml.city), - (PARISH, ml.parish), - (COUNTY, ml.county), - (STATE, ml.state), - (POSTAL, ml.postal), - (COUNTRY, ml.country), - (LOCATIONS, place.get_alternate_locations() ) ]: + if place.main_loc: + ml = place.get_main_location() + if ml and not ml.is_empty(): + for val in [ + (LATITUDE, place.lat), + (LONGITUDE, place.long), + (STREET, ml.street), + (CITY, ml.city), + (PARISH, ml.parish), + (COUNTY, ml.county), + (STATE, ml.state), + (POSTAL, ml.postal), + (COUNTRY, ml.country), + (LOCATIONS, place.get_alternate_locations() ) ]: - if val[1]: - trow = Html("tr") + ( - Html("td", val[0], class_ = "ColumnAttribute", inline = True), - Html("td", val[1], class_ = "ColumnValue", inline = True) - ) - table += trow + if val[1]: + trow = Html("tr") + ( + Html("td", val[0], class_ = "ColumnAttribute", inline = True), + Html("td", val[1], class_ = "ColumnValue", inline = True) + ) + table += trow # return place table to its callers return table