Skip to content

Commit

Permalink
Merge pull request #89 from aanil/master
Browse files Browse the repository at this point in the history
Order portal update script: Skip GA projects
  • Loading branch information
ssjunnebo authored Aug 27, 2020
2 parents 5848ddf + ce2b98a commit ca57cbf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/updateOrderPortal.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def update_order_internal_id(self, open_date, dry_run):
ORDER_ID = project.udf['Portal ID']
except KeyError:
continue
if not ORDER_ID.startswith('NGI'):
continue

url = '{base}/api/v1/order/{id}'.format(base=self.base_url, id=ORDER_ID)
data = {'fields': {'project_ngi_name': project.name, 'project_ngi_identifier': project.id}}
Expand All @@ -52,6 +54,8 @@ def update_order_status(self, to_date, dry_run):
ORDER_ID = project.udf['Portal ID']
except KeyError:
continue
if not ORDER_ID.startswith('NGI'):
continue
url = '{base}/api/v1/order/{id}'.format(base=self.base_url, id=ORDER_ID)
response = requests.get(url, headers=self.headers)
data = ''
Expand Down

0 comments on commit ca57cbf

Please sign in to comment.