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]
|
return [ret.weekday for ret in self.schedule.all() if ret.works_at_noon]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def works_afternoon(self):
|
def works_evening(self):
|
||||||
""" Used for indexing working by day """
|
""" Used for indexing working by day """
|
||||||
return [ret.weekday for ret in self.schedule.all() if ret.works_at_afternoon]
|
return [ret.weekday for ret in self.schedule.all() if ret.works_at_afternoon]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ class EstablishmentDocument(Document):
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
multi=True)
|
multi=True)
|
||||||
works_afternoon = fields.ListField(fields.IntegerField(
|
works_evening = fields.ListField(fields.IntegerField(
|
||||||
attr='works_afternoon'
|
attr='works_evening'
|
||||||
))
|
))
|
||||||
works_noon = fields.ListField(fields.IntegerField(
|
works_noon = fields.ListField(fields.IntegerField(
|
||||||
attr='works_noon'
|
attr='works_noon'
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class EstablishmentDocumentSerializer(DocumentSerializer):
|
||||||
'address',
|
'address',
|
||||||
'tags',
|
'tags',
|
||||||
'works_noon',
|
'works_noon',
|
||||||
'works_afternoon',
|
'works_evening',
|
||||||
# 'collections',
|
# 'collections',
|
||||||
# 'establishment_type',
|
# 'establishment_type',
|
||||||
# 'establishment_subtypes',
|
# 'establishment_subtypes',
|
||||||
|
|
|
||||||
|
|
@ -130,8 +130,8 @@ class EstablishmentDocumentViewSet(BaseDocumentViewSet):
|
||||||
constants.LOOKUP_QUERY_IN,
|
constants.LOOKUP_QUERY_IN,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'works_afternoon': {
|
'works_evening': {
|
||||||
'field': 'works_afternoon',
|
'field': 'works_evening',
|
||||||
'lookups': [
|
'lookups': [
|
||||||
constants.LOOKUP_QUERY_IN,
|
constants.LOOKUP_QUERY_IN,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user