Suppression des doublons

This commit is contained in:
Evarin 2017-05-19 22:40:26 +02:00
parent 918dda747b
commit fde7a53e05

View file

@ -42,6 +42,10 @@ class LieuResource(ModelResource):
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
def dehydrate(self, bundle):
bundle = super(LieuResource, self).dehydrate(bundle)