Skip to content

Commit

Permalink
compare local filings to db
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfenfen committed Jul 21, 2022
1 parent 8c3f9db commit d2f8e09
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions irsdb/filing/management/commands/find_new_filings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ class Command(BaseCommand):
they don't exist. Lines are added in bulk at the end.
'''

def add_arguments(self, parser):
# Positional arguments
parser.add_argument('year', nargs='+', type=int)

def get_writer(self, headers):
outfilehandle = open('results.csv', 'w')
Expand All @@ -43,9 +40,9 @@ def handle(self, *args, **options):
try:
this_filing = Filing.objects.get(object_id=return_id)
except Filing.DoesNotExist:
print("Filing not present, adding to list")
found_files['object_id'] = 1
writer.writerow({'object_id': return_id})
except Filing.MultipleObjectsReturned:
print("Multiple objects returned for %s " % return_id)

num_found += 1
print(found_files)
Expand Down

0 comments on commit d2f8e09

Please sign in to comment.