Skip to content

Commit

Permalink
Remove filtering out of frames with no versions.
Browse files Browse the repository at this point in the history
This does not preserve ordering defined as -observation_date on the model. Need to find a better way of doing this.
  • Loading branch information
mgdaily committed Jun 3, 2024
1 parent c7f29d9 commit 437312c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions archive/frames/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ def get_queryset(self):
.prefetch_related('version_set')
.prefetch_related(Prefetch('related_frames', queryset=Frame.objects.all().only('id')))
.prefetch_related('thumbnails')
.annotate(num_versions=Count('version'))
.filter(num_versions__gt=0)
)
if self.request.user.is_superuser:
return queryset
Expand Down Expand Up @@ -168,7 +166,7 @@ def zip(self, request):
datetime.date.strftime(datetime.date.today(), '%Y%m%d'),
frames.count()
)
body = build_nginx_zip_text(frames, filename, uncompress=request_serializer.data.get('uncompress'),
body = build_nginx_zip_text(frames, filename, uncompress=request_serializer.data.get('uncompress'),
catalog_only=request_serializer.data.get('catalog_only'))
response = HttpResponse(body, content_type='text/plain')
response['X-Archive-Files'] = 'zip'
Expand Down

0 comments on commit 437312c

Please sign in to comment.