return instance
- def to_representation(self, instance):
+ def to_representation(self, instance: Workflow) -> dict[str, Any]:
data = super().to_representation(instance)
actions = instance.actions.order_by("order", "pk")
data["actions"] = WorkflowActionSerializer(
return response
-def serve_file(*, doc: Document, use_archive: bool, disposition: str):
+def serve_file(*, doc: Document, use_archive: bool, disposition: str) -> HttpResponse:
if use_archive:
file_handle = doc.archive_file
filename = doc.get_public_filename(archive=True)