From ce2b98a1be47bd60f91ee5e121afba52da913283 Mon Sep 17 00:00:00 2001 From: Anandashankar Anil Date: Thu, 27 Aug 2020 10:45:00 +0200 Subject: [PATCH] Order portal update script: Skip GA projects --- scripts/updateOrderPortal.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/updateOrderPortal.py b/scripts/updateOrderPortal.py index 5b42fa9..11ae449 100644 --- a/scripts/updateOrderPortal.py +++ b/scripts/updateOrderPortal.py @@ -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}} @@ -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 = ''