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 909e8ef commit b110e3bCopy full SHA for b110e3b
wordpress/api.py
@@ -89,10 +89,10 @@ def request_post_mortem(self, response=None):
89
headers = response.headers
90
91
requester_api_url = self.requester.api_url
92
- if hasattr(response, 'links'):
+ if hasattr(response, 'links') and response.links:
93
links = response.links
94
- if 'https://api.w.org/' in links:
95
- header_api_url = links['https://api.w.org/'].get('url', '')
+ first_link_key = list(links)[0]
+ header_api_url = links[first_link_key].get('url', '')
96
97
if header_api_url and requester_api_url\
98
and header_api_url != requester_api_url:
0 commit comments