feat: show upcoming traits
This commit is contained in:
@@ -85,6 +85,12 @@ class Person(models.Model):
|
||||
return self.traits_at_date(datetime.now()).values_list(
|
||||
'pk', 'trait__key', 'trait__label')
|
||||
|
||||
@property
|
||||
def upcoming_attributes(self):
|
||||
today = datetime.now()
|
||||
return self.traits.filter(Q(valid_from__gt=today)).values_list(
|
||||
'pk', 'trait__key', 'trait__label', 'valid_from')
|
||||
|
||||
@property
|
||||
def current_checkin(self):
|
||||
return Booking.currently_open_checkin(self)
|
||||
|
||||
Reference in New Issue
Block a user