diff --git a/django-backend/fecfiler/transactions/models.py b/django-backend/fecfiler/transactions/models.py index 0bb301982e..7bd6e78bc3 100644 --- a/django-backend/fecfiler/transactions/models.py +++ b/django-backend/fecfiler/transactions/models.py @@ -191,7 +191,6 @@ def save(self, *args, **kwargs): if self.memo_text: self.memo_text.transaction_uuid = self.id self.memo_text.save() - super(Transaction, self).save(*args, **kwargs) def delete(self): diff --git a/django-backend/fecfiler/transactions/views.py b/django-backend/fecfiler/transactions/views.py index 506789262a..f41106a78b 100644 --- a/django-backend/fecfiler/transactions/views.py +++ b/django-backend/fecfiler/transactions/views.py @@ -245,6 +245,7 @@ def get_previous( return Response(response, status=status.HTTP_404_NOT_FOUND) def save_transaction(self, transaction_data, request): + committee_id = request.session["committee_uuid"] report_ids = transaction_data.pop("report_ids", []) children = transaction_data.pop("children", []) schedule = transaction_data.get("schedule_id") @@ -278,7 +279,7 @@ def save_transaction(self, transaction_data, request): contact_instances = { contact_key: create_or_update_contact( - transaction_data, contact_key, request.session["committee_uuid"] + transaction_data, contact_key, committee_id ) for contact_key in ["contact_1", "contact_2", "contact_3"] if contact_key in transaction_data @@ -305,6 +306,9 @@ def save_transaction(self, transaction_data, request): schedule_instance.report_coverage_from_date = report.coverage_from_date schedule_instance.save() + Report.objects.filter(committee_account_id=committee_id).update( + calculation_status=None + ) logger.info( f"Transaction {transaction_instance.id} " f"linked to report(s): {', '.join(report_ids)}"