Skip to content

Commit

Permalink
Correctly parse param to boolean
Browse files Browse the repository at this point in the history
Signed-off-by: Kipchirchir Sigei <[email protected]>
  • Loading branch information
KipSigei committed Jun 20, 2023
1 parent 7d7edea commit 6880703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onadata/apps/api/viewsets/data_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
OSMSerializer,
)
from onadata.libs.utils.api_export_tools import custom_response_handler
from onadata.libs.utils.common_tools import json_stream
from onadata.libs.utils.common_tools import json_stream, str_to_bool
from onadata.libs.utils.viewer_tools import get_enketo_urls, get_form_url

SAFE_METHODS = ["GET", "HEAD", "OPTIONS"]
Expand Down Expand Up @@ -343,7 +343,7 @@ def destroy(self, request, *args, **kwargs):
instance_ids = request.data.get("instance_ids")
delete_all_submissions = strtobool(request.data.get("delete_all", "False"))
# get param to trigger permanent submission deletion
permanent_delete = strtobool(request.data.get("permanent_delete", "False"))
permanent_delete = str_to_bool(request.data.get("permanent_delete"))
enable_submission_permanent_delete = getattr(
settings, "ENABLE_SUBMISSION_PERMANENT_DELETE", False
)
Expand Down

0 comments on commit 6880703

Please sign in to comment.