ES. Establishment. filter by collection_type
This commit is contained in:
parent
6e7a617a67
commit
3f55e001cc
|
|
@ -55,6 +55,10 @@ class EstablishmentDocument(Document):
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
collections = fields.ObjectField(properties={
|
||||||
|
'id': fields.IntegerField(attr='collection.id'),
|
||||||
|
'collection_type': fields.IntegerField(attr='collection.collection_type'),
|
||||||
|
})
|
||||||
|
|
||||||
class Django:
|
class Django:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ class EstablishmentDocumentSerializer(DocumentSerializer):
|
||||||
'description_translated',
|
'description_translated',
|
||||||
'tags',
|
'tags',
|
||||||
'address',
|
'address',
|
||||||
|
'collections',
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
|
|
@ -91,5 +91,8 @@ class EstablishmentDocumentViewSet(BaseDocumentViewSet):
|
||||||
},
|
},
|
||||||
'tags_category_id': {
|
'tags_category_id': {
|
||||||
'field': 'tags.category.id',
|
'field': 'tags.category.id',
|
||||||
}
|
},
|
||||||
|
'collection_type': {
|
||||||
|
'field': 'collections.collection_type'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user