Skip to content

Commit c19ca5b

Browse files
committed
refactor: remove unneeded check
1 parent a4a7ae4 commit c19ca5b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

scripts/download_sa_advisories.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def download_sa_advisories_from_rest_api(last_modified_timestamp: int) -> None:
5656
print(f'X API responded {response.status_code}')
5757
break
5858
data: drupal.ApiResponse[drupal.Advisory] = response.json()
59+
url = data.get('next', '').replace('api-d7/node?', 'api-d7/node.json?')
5960
for item in data['list']:
6061
changed = int(item['changed'])
6162
if changed <= last_modified_timestamp:
@@ -70,8 +71,6 @@ def download_sa_advisories_from_rest_api(last_modified_timestamp: int) -> None:
7071
json.dump(item, f)
7172
f.write('\n')
7273
print(' \\- finished processing page')
73-
if 'next' in data and data['next'] != '':
74-
url = data['next'].replace('api-d7/node?', 'api-d7/node.json?')
7574
print('finished processing new and updated advisories')
7675

7776

0 commit comments

Comments
 (0)