We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9723146 + 7625374 commit 4f95a9fCopy full SHA for 4f95a9f
indigo_api/views/documents.py
@@ -1,3 +1,4 @@
1
+import datetime
2
import logging
3
import copy
4
@@ -286,6 +287,11 @@ class DocumentActivityViewSet(DocumentResourceView,
286
287
def get_queryset(self):
288
return self.document.activities.prefetch_related('user').all()
289
290
+ def filter_queryset(self, queryset):
291
+ # only return entries that aren't stale
292
+ threshold = timezone.now() - datetime.timedelta(seconds=DocumentActivity.DEAD_SECS)
293
+ return queryset.filter(updated_at__gt=threshold)
294
+
295
def create(self, request, *args, **kwargs):
296
# if they've provided additional finished nonces, clear those out
297
if request.data.get('finished_nonces'):
0 commit comments