Skip to content

Commit

Permalink
Included projects belonging to MGHPCC-managed groups in the NERC tota…
Browse files Browse the repository at this point in the history
…l invoice
  • Loading branch information
QuanMPhm committed Jan 22, 2025
1 parent a848c88 commit 30dfb47
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion process_report/invoices/NERC_total_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ def output_s3_archive_key(self):
return f"Invoices/{self.invoice_month}/Archive/NERC-{self.invoice_month}-Total-Invoice {util.get_iso8601_time()}.csv"

def _prepare_export(self):
def _lower_col(data):
if data:
return str.lower(data)

self.export_data = self.data[
self.data[invoice.IS_BILLABLE_FIELD] & ~self.data[invoice.MISSING_PI_FIELD]
]
self.export_data = self.export_data[
self.export_data[invoice.INSTITUTION_FIELD].isin(self.INCLUDED_INSTITUTIONS)
].copy()
| (self.export_data[invoice.GROUP_MANAGED_FIELD].apply(_lower_col) == "yes")
]

0 comments on commit 30dfb47

Please sign in to comment.