Skip to content

Commit

Permalink
Ignores output rows for Free Tier PIs and writes out warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
bettingr committed Dec 11, 2024
1 parent 5d116c4 commit 62386fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gen_ilab_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,11 @@ def output_ilab_csv_data_for_consulting(csv_dictwriter, pi_tag, service_req_id,

def output_ilab_csv_data_row(csv_dictwriter, pi_tag, service_req_id, end_month_string, service_id, note, amount):

# Confirm we have a real service ID and not the "Free" of Free Tier
if not re.match("[0-9]+", str(service_req_id)):
print("\n Free Tier PI {} has charge for {}...ignoring".format(pi_tag, note, file=sys.stderr))
return False

# Create a dictionary to be written out as CSV.
csv_dict = dict()
# If there is an 'iLab Owner Email' available, use that, o/w, use the PI email.
Expand Down

0 comments on commit 62386fa

Please sign in to comment.