opening_at for establishment
This commit is contained in:
parent
c5992afec0
commit
552e08e242
|
|
@ -116,6 +116,7 @@ class EstablishmentDocument(Document):
|
|||
'weekday': fields.IntegerField(attr='weekday'),
|
||||
'weekday_display': fields.KeywordField(attr='get_weekday_display'),
|
||||
'closed_at': fields.KeywordField(attr='closed_at_str'),
|
||||
'opening_at': fields.KeywordField(attr='opening_at_str'),
|
||||
}
|
||||
))
|
||||
address = fields.ObjectField(
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ class Timetable(ProjectBaseMixin):
|
|||
def closed_at_str(self):
|
||||
return str(self.closed_at) if self.closed_at else None
|
||||
|
||||
@property
|
||||
def opening_at_str(self):
|
||||
return str(self.opening_at) if self.opening_at else None
|
||||
|
||||
@property
|
||||
def opening_time(self):
|
||||
return self.opening_at or self.lunch_start or self.dinner_start
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user