Skip to content

Commit

Permalink
Merge c886fa6 into d5cdeec
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Nov 14, 2022
2 parents d5cdeec + c886fa6 commit 134b773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inventree/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def downloadFile(self, url, destination, overwrite=False, params=None):

headers = response.headers

if 'text/html' in headers['Content-Type']:
if 'Content-Type' in headers and 'text/html' in headers['Content-Type']:
logger.error(f"Error downloading file '{url}': Server return invalid response (text/html)")
return False

Expand Down

0 comments on commit 134b773

Please sign in to comment.