Suppression des doublons
This commit is contained in:
parent
918dda747b
commit
fde7a53e05
1 changed files with 4 additions and 0 deletions
|
@ -42,6 +42,10 @@ class LieuResource(ModelResource):
|
||||||
|
|
||||||
return orm_filters
|
return orm_filters
|
||||||
|
|
||||||
|
# Custom apply filters pour ajouter le "distinct"
|
||||||
|
def apply_filters(self, request, applicable_filters):
|
||||||
|
return self.get_object_list(request).filter(**applicable_filters).distinct()
|
||||||
|
|
||||||
# Ajout d'informations
|
# Ajout d'informations
|
||||||
def dehydrate(self, bundle):
|
def dehydrate(self, bundle):
|
||||||
bundle = super(LieuResource, self).dehydrate(bundle)
|
bundle = super(LieuResource, self).dehydrate(bundle)
|
||||||
|
|
Loading…
Reference in a new issue