Skip to content

Commit 2361acf

Browse files
authored
Merge pull request #104 from sapcc/fix_nontype_error_check
fix nonetype error check by checking if not none
2 parents 0b8d886 + 11e9743 commit 2361acf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

auditmiddleware/_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ def _create_events(self, target_project, res_id,
453453

454454
# attach payload if requested
455455
if self._payloads_enabled and res_spec.payloads['enabled'] \
456+
and request.content_length is not None \
456457
and request.content_length > 0 \
457458
and request.content_type == "application/json":
458459
req_pl = request.json

0 commit comments

Comments
 (0)