Skip to content

Commit

Permalink
hotfix - fix export report type
Browse files Browse the repository at this point in the history
  • Loading branch information
shapiromatron committed Oct 7, 2023
1 parent ddebd4d commit 0aac8d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion hawc/apps/assessment/actions/audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pandas as pd
from django.contrib.contenttypes.models import ContentType
from django.db.models import QuerySet
from rest_framework.response import Response
from reversion.models import Version

from ...common.helper import FlatExport
Expand Down Expand Up @@ -246,7 +247,7 @@ def get_queryset(self):
qs = getattr(self, method)()
return qs.select_related("content_type", "revision")

def export(self) -> FlatExport:
def export(self) -> Response:
qs = self.get_queryset()
df = pd.DataFrame(
qs.values_list(
Expand Down
3 changes: 1 addition & 2 deletions hawc/apps/assessment/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,7 @@ def add_item(app, count, title, url_route, modal_key):
def logs(self, request: Request, pk: int, type: str):
instance = self.get_object()
serializer = AssessmentAuditSerializer.from_drf(data=dict(assessment=instance, type=type))
export = serializer.export()
return Response(export)
return serializer.export()

@action(
detail=False,
Expand Down

0 comments on commit 0aac8d2

Please sign in to comment.