fix resource aggregations when not found dataset

This commit is contained in:
Jorge Pastor 2024-03-11 13:49:03 +01:00
parent ae88cc4911
commit d29ffa900d
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ class Last(Aggregation):
def filter(self, dataset, date=None):
lastdataset = dataset.order_by('-id').first()
if lastdataset is not None:
dataset = dataset.filter( launch_id=lastdataset.launch_id)
# now = timezone.now()
# epoch = now - datetime.timedelta(minutes=2)