fix resource aggregations when not found dataset
This commit is contained in:
parent
ae88cc4911
commit
d29ffa900d
|
@ -34,6 +34,7 @@ class Last(Aggregation):
|
||||||
def filter(self, dataset, date=None):
|
def filter(self, dataset, date=None):
|
||||||
|
|
||||||
lastdataset = dataset.order_by('-id').first()
|
lastdataset = dataset.order_by('-id').first()
|
||||||
|
if lastdataset is not None:
|
||||||
dataset = dataset.filter( launch_id=lastdataset.launch_id)
|
dataset = dataset.filter( launch_id=lastdataset.launch_id)
|
||||||
# now = timezone.now()
|
# now = timezone.now()
|
||||||
# epoch = now - datetime.timedelta(minutes=2)
|
# epoch = now - datetime.timedelta(minutes=2)
|
||||||
|
|
Loading…
Reference in New Issue