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

Jeremy Kerr jk at ozlabs.org
Mon Sep 4 16:16:00 AEST 2017


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.

Cheers,


Jeremy


More information about the Patchwork mailing list