Code review comment for lp:~gmb/launchpad/ajax-dupefinder-has-risen-from-the-grave

Revision history for this message
Graham Binns (gmb) wrote :

> > === modified file 'lib/lp/bugs/browser/bugtarget.py'
> > --- lib/lp/bugs/browser/bugtarget.py 2009-11-26 11:32:54 +0000
> > +++ lib/lp/bugs/browser/bugtarget.py 2009-12-09 12:13:43 +0000
> > @@ -56,6 +56,7 @@
> > from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
> > from canonical.launchpad.interfaces.temporaryblobstorage import (
> > ITemporaryStorageManager)
> > +from canonical.launchpad.webapp import urlappend
> > from canonical.launchpad.webapp.breadcrumb import Breadcrumb
> > from canonical.launchpad.webapp.interfaces import ILaunchBag, NotFoundError
> > from lp.bugs.interfaces.bug import (
> > @@ -368,7 +369,6 @@
> >
> > def validate(self, data):
> > """Make sure the package name, if provided, exists in the distro."""
> > -
> > # The comment field is only required if filing a new bug.
> > if self.submit_bug_action.submitted():
> > comment = data.get('comment')
> > @@ -700,6 +700,26 @@
> > """Override this method in base classes to show the filebug form."""
> > raise NotImplementedError
> >
> > + @property
> > + def inline_filebug_form_url(self):
> > + """The URL to the inline filebug form.
> > +
> > + If a token was passed to this view, it will be be passed through
> > + to the inline bug filing form via the returned URL.
> > + """
> > + url = urlappend(canonical_url(self.context), '+filebug-inline-form')
>
> No need for urlappend here; pass view="+filebug-inline-form" to
> canonical_url().
>

Right. No idea what I was smoking when I wrote that.

> > + if self.extra_data_token is not None:
> > + url = urlappend(url, self.extra_data_token)
> > + return url
> > +
> > + @property
> > + def duplicate_search_url(self):
> > + """The URL to the inline duplicate search view."""
> > + url = urlappend(canonical_url(self.context), '+filebug-show-similar')
>
> Again with the view argument to canonical_url().
>

Yep.

« Back to merge proposal