# HG changeset patch # User Paul Boddie # Date 1328659398 -3600 # Node ID 00ff41f211fcdb5f80d37a524761a590d7cbaae3 # Parent df25940f8e202ee003ae158849c37276f052b124 Changed tests for the map name to handle an empty map name string, as is set when the view is initialised from an in-page request involving the action. diff -r df25940f8e20 -r 00ff41f211fc EventAggregatorSupport.py --- a/EventAggregatorSupport.py Tue Feb 07 23:42:33 2012 +0100 +++ b/EventAggregatorSupport.py Wed Feb 08 01:03:18 2012 +0100 @@ -1857,7 +1857,7 @@ output.append(linkToPage(request, page, _("View as table"), table_link, onclick=table_update_link)) output.append(fmt.span(on=0)) - if self.mode != "map" and self.map_name is not None: + if self.mode != "map" and self.map_name: output.append(fmt.span(on=1, css_class="event-view")) output.append(linkToPage(request, page, _("View as map"), map_link, onclick=map_update_link)) output.append(fmt.span(on=0)) @@ -2830,7 +2830,7 @@ # Get the map image definition. - if maps is not None and self.map_name is not None: + if maps is not None and self.map_name: try: map_details = maps[self.map_name].split() @@ -2852,7 +2852,7 @@ _("You do not have read access to the maps page:"), maps_page)) - elif self.map_name is None: + elif not self.map_name: output.append(self.showDictError( _("Please specify a valid map name corresponding to an entry on the following page:"), maps_page))