[PATCH] REST: Filter projects by 'linkname', not 'name'

Stephen Finucane stephen at that.guru
Mon Sep 4 18:42:27 AEST 2017


On Mon, 2017-09-04 at 16:16 +1000, Jeremy Kerr wrote:
> Hi Dnaiel,
> 
> > I was just reading though this before applying it when it occurred to
> > me:
> > >          except ValueError:
> > > -            filters = {'name__iexact': ' '.join(value.split('-'))}
> > > +            filters = {'linkname__iexact': ' '.join(value.split('-'))}
> > 
> > Surely a linkname shouldn't have spaces in it? It'd be of the form
> > foo.bar.org, right?
> 
> patchwork=# select linkname from patchwork_project limit 10;
>      linkname
> -------------------
>  cbe-oss-dev
>  linux-mtd
>  linuxppc-embedded
>  linux-ext4
>  netdev
>  sparclinux
>  linux-ide
>  qemu-devel
>  ubuntu-kernel
>  yaboot
> 
> So yes, we wouldn't expect spaces, and we tend to use dashes instead of
> dots. This is essentially used as a path component in URLs.

Yup, I wouldn't expect to see any spaces. If this isn't already forced
somewhere, we should probably add a validator to do so. For now though, feel
free to fix this bit when you merge.

Stephen


More information about the Patchwork mailing list