Hey Dominic updated the code .


On Tue, Dec 24, 2013 at 6:48 PM, Dominic König <notifications@github.com>wrote:

> In modules/s3db/gis.py:
>
> > +                                                 show_link=show_link)
> > +
> > +
> > +        def represent_row(self,row):
> > +            """
> > +                Represent a Row
> > +                @param row: The Row
> > +            """
> > +
> > +            instance_type = row.instance_type
> > +            instance_type_nice = s3db.gis_layer_entity.instance_type.represent(instance_type)
> > +            represent = "%s (%s)" % (row.name, instance_type_nice)
> > +            if show_link:
> > +                represent = self.link("layer_id",row.layer_id,row)
> > +
> > +            return represent
> >  # =============================================================================
>
> What he means is that the link() function is called from the renderer when
> you set linkto=True, and thus it should not be called separately from
> represent_row.
>
> Instead, you should implement a link function which takes (layer_id,
> represent, row=None) as input and returns a link - it would basically do
> the same as the "if showlink" branch.
>
> Can't help you so much more than that - otherwise there's no point in
> having you just retype what I type.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/flavour/eden/pull/683/files#r8543101>
> .
>