Skip to content

Commit

Permalink
handle a new final filing better
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Apr 25, 2024
1 parent 07e1b5f commit 6aee370
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions camp_fin/management/commands/import_candidate_filings.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ def handle(self, *args, **options):
except models.Filing.DoesNotExist:
pass
else:
previous_final.final = None
previous_final.save()
# we will delete this to clear out associated
# transactions, and the expectation it will be
# recreated shortly
previous_final.delete()

filing = self._create_filing(record)
filings_created += 1
Expand Down
6 changes: 4 additions & 2 deletions camp_fin/management/commands/import_pac_filings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ def handle(self, *args, **options):
except models.Filing.DoesNotExist:
pass
else:
previous_final.final = None
previous_final.save()
# we will delete this to clear out associated
# transactions, and the expectation it will be
# recreated shortly
previous_final.delete()

filing = self._create_filing(record)
filings_created += 1
Expand Down

0 comments on commit 6aee370

Please sign in to comment.