[PATCH v5 06/10] REST: Add Patches to the API

Andy Doan andy.doan at linaro.org
Fri Jun 17 06:49:57 AEST 2016


On 06/02/2016 08:23 AM, Finucane, Stephen wrote:
> On another note, is there any advantage in displaying the tags per user,
> rather than a cumulative count, like so:
>
>      {
>          "Reviewed-by": [
>              "http://localhost:8000/api/1.0/people/28/"
>          ]
>      }

I'm not sure how that's possible. Tags are just:

class PatchTag(models.Model):
     patch = models.ForeignKey('Patch')
     tag = models.ForeignKey('Tag')
     count = models.IntegerField(default=1)

I don't see the way we'd show users other than parsing all the comment 
fields.

> This could be dumb/poor-performing suggestion, so it's just that:)

Probably could do in the patch-detail, and just keep the counts in the 
listing.


More information about the Patchwork mailing list