Rename variable
This commit is contained in:
parent
40f1cc1e22
commit
6a85e52abc
|
|
@ -374,7 +374,7 @@ class Establishment(ProjectBaseMixin, URLImageMixin, TranslatedFieldsMixin):
|
|||
return [ret.weekday for ret in self.schedule.all() if ret.works_at_noon]
|
||||
|
||||
@property
|
||||
def works_afternoon(self):
|
||||
def works_evening(self):
|
||||
""" Used for indexing working by day """
|
||||
return [ret.weekday for ret in self.schedule.all() if ret.works_at_afternoon]
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ class EstablishmentDocument(Document):
|
|||
}),
|
||||
},
|
||||
multi=True)
|
||||
works_afternoon = fields.ListField(fields.IntegerField(
|
||||
attr='works_afternoon'
|
||||
works_evening = fields.ListField(fields.IntegerField(
|
||||
attr='works_evening'
|
||||
))
|
||||
works_noon = fields.ListField(fields.IntegerField(
|
||||
attr='works_noon'
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class EstablishmentDocumentSerializer(DocumentSerializer):
|
|||
'address',
|
||||
'tags',
|
||||
'works_noon',
|
||||
'works_afternoon',
|
||||
'works_evening',
|
||||
# 'collections',
|
||||
# 'establishment_type',
|
||||
# 'establishment_subtypes',
|
||||
|
|
|
|||
|
|
@ -130,8 +130,8 @@ class EstablishmentDocumentViewSet(BaseDocumentViewSet):
|
|||
constants.LOOKUP_QUERY_IN,
|
||||
],
|
||||
},
|
||||
'works_afternoon': {
|
||||
'field': 'works_afternoon',
|
||||
'works_evening': {
|
||||
'field': 'works_evening',
|
||||
'lookups': [
|
||||
constants.LOOKUP_QUERY_IN,
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user