Rename variable

This commit is contained in:
Kuroshini 2019-10-17 12:30:40 +03:00
parent 40f1cc1e22
commit 6a85e52abc
4 changed files with 6 additions and 6 deletions

View File

@ -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]

View File

@ -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'

View File

@ -85,7 +85,7 @@ class EstablishmentDocumentSerializer(DocumentSerializer):
'address',
'tags',
'works_noon',
'works_afternoon',
'works_evening',
# 'collections',
# 'establishment_type',
# 'establishment_subtypes',

View File

@ -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,
],