diff --git a/osf/metrics/reporters/_base.py b/osf/metrics/reporters/_base.py index 9ba6ddc529b..bd02ee881cf 100644 --- a/osf/metrics/reporters/_base.py +++ b/osf/metrics/reporters/_base.py @@ -20,7 +20,7 @@ def report( def run_and_record_for_month(self, report_yearmonth: YearMonth) -> None: reports = self.report(report_yearmonth) for report in reports: - assert str(report.report_yearmonth) == str(report_yearmonth) + report.report_yearmonth = report_yearmonth report.save() diff --git a/osf/metrics/reporters/institutional_users.py b/osf/metrics/reporters/institutional_users.py index 7c92102851d..abe835bcb9c 100644 --- a/osf/metrics/reporters/institutional_users.py +++ b/osf/metrics/reporters/institutional_users.py @@ -43,7 +43,6 @@ class _InstiUserReportHelper: def __post_init__(self): _affiliation = self.user.get_institution_affiliation(self.institution._id) self.report = InstitutionalUserReport( - report_yearmonth=self.yearmonth, institution_id=self.institution._id, user_id=self.user._id, user_name=self.user.fullname, diff --git a/osf/metrics/reporters/spam_count.py b/osf/metrics/reporters/spam_count.py index 54feae8bee5..b8f596c4a82 100644 --- a/osf/metrics/reporters/spam_count.py +++ b/osf/metrics/reporters/spam_count.py @@ -13,7 +13,6 @@ def report(self, report_yearmonth): next_month = report_yearmonth.next_month() report = SpamSummaryReport( - report_yearmonth=str(report_yearmonth), # Node Log entries node_confirmed_spam=NodeLog.objects.filter( action=NodeLog.CONFIRM_SPAM,