Skip to content

Commit

Permalink
Don't post request to Threatr if no value is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
U039b committed Oct 16, 2024
1 parent 1a60923 commit 9d1f76f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions colander/core/threatr.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ def send_request(self, data) -> (list, bool):
return [], False
if not data:
return [], False
if not data.get('value', ''):
return [], False
response = requests.post(f'{self.url}/api/request/', headers=self.__get_headers(), json=data)
if response.status_code == 201:
return [], True
Expand Down

0 comments on commit 9d1f76f

Please sign in to comment.