Skip to content

Commit

Permalink
return with message after deleting submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Nov 19, 2024
1 parent a16a0e9 commit 300f067
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion onadata/apps/api/viewsets/data_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ def destroy(self, request, *args, **kwargs):
XFORM_SUBMISSIONS_DELETING_TTL,
)

return Response(status=status.HTTP_200_OK)
return Response(
data={"message": f"{len(instance_ids)} records were deleted"},
status=status.HTTP_200_OK,
)

if isinstance(self.object, Instance):
if request.user.has_perm(CAN_DELETE_SUBMISSION, self.object.xform):
Expand Down

0 comments on commit 300f067

Please sign in to comment.