We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c66f21a commit 23aad68Copy full SHA for 23aad68
onadata/libs/utils/logger_tools.py
@@ -680,7 +680,12 @@ def safe_create_instance( # noqa C901
680
response = OpenRosaResponse(_("Duplicate submission"))
681
response.status_code = 202
682
if request:
683
- response["Location"] = request.build_absolute_uri(request.path)
+ try:
684
+ response["Location"] = request.build_absolute_uri(request.path)
685
+ except KeyError:
686
+ # Handle cases where request doesn't have required META data
687
+ # (e.g., synthetic requests from background tasks)
688
+ pass
689
error = response
690
instance = None
691
return [error, instance]
0 commit comments