diff --git a/requiam/grouper_query.py b/requiam/grouper_query.py index 2bf99a48..f64daa3c 100644 --- a/requiam/grouper_query.py +++ b/requiam/grouper_query.py @@ -149,9 +149,12 @@ def grouper_delta_user(group, stem, netid, uaid, action, grouper_dict, # Update manual CSV file if not isinstance(mo, type(None)): - mo.update_dataframe(netid, uaid, group, stem) + if production: + mo.update_dataframe(netid, uaid, group, stem) + else: + log.info("Working with figtest stem. Not updating dataframe") else: log.info('dry run, not performing synchronization') - log.info('dry run, not updating portal dataframe') + log.info('dry run, not updating dataframe') return d diff --git a/scripts/user_update b/scripts/user_update index faea58a3..7e27692a 100644 --- a/scripts/user_update +++ b/scripts/user_update @@ -334,9 +334,12 @@ if __name__ == '__main__': # Remove entry from manual CSV file for 'root' case if args.sync: # Update of df only needed since there's not root portal to add too - mo.update_dataframe(current_dict['not_portal']['netid'], - current_dict['not_portal']['uaid'], - vargs['portal'], 'portal') + if grouper_production: + mo.update_dataframe(current_dict['not_portal']['netid'], + current_dict['not_portal']['uaid'], + vargs['portal'], 'portal') + else: + log.info("Working with figtest stem. Not updating") else: log.info('dry run, not updating portal dataframe') @@ -376,9 +379,12 @@ if __name__ == '__main__': # Remove entry from manual CSV file for 'root' case if args.sync: # Update of df only needed since there's not root portal to add too - mo.update_dataframe(current_dict['not_quota']['netid'], - current_dict['not_quota']['uaid'], - vargs['quota'], 'quota') + if grouper_production: + mo.update_dataframe(current_dict['not_quota']['netid'], + current_dict['not_quota']['uaid'], + vargs['quota'], 'quota') + else: + log.info("Working with figtest stem. Not updating") else: log.info('dry run, not updating portal dataframe')