Sfoglia il codice sorgente

Clean-up PinResource.build_filters method

tags/v1.0.0
Krzysztof Klimonda 11 anni fa
parent
commit
e5bd3d577d
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. +1
    -3
      pinry/core/api.py

+ 1
- 3
pinry/core/api.py Vedi File

@@ -100,10 +100,8 @@ class PinResource(ModelResource):
return map(str, bundle.obj.tags.all())

def build_filters(self, filters=None):
if filters is None:
filters = {}
orm_filters = super(PinResource, self).build_filters(filters)
if 'tag' in filters:
if filters and 'tag' in filters:
orm_filters['tags__name__in'] = filters['tag'].split(',')
return orm_filters



Caricamento…
Annulla
Salva