Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue preventing DEF 14A filings from downloading #130

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

jadchaar
Copy link
Owner

@jadchaar jadchaar commented Oct 8, 2023

It seems to be an issue with the use of rstrip when cleaning up the amends suffix here:

form.rstrip(AMENDS_SUFFIX) != download_metadata.form

Upon testing, it appears that the use of rstrip is leading to some unintended issues when a filing type ends with any type of A:

>>> test_no_amend = "DEF 14A"
>>> test_no_amend.rstrip("/A")
DEF 14
>>> test_amend = "DEF 14A/A"
>>> test_amend.rstrip("/A")
DEF 14

Solution is to switch from rstrip to [:-2] if an amend is detected. When an amend is not detected, the form will be used as-is and not manipulated.

Closes: #129

@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b919ddd) 100.00% compared to head (42ee0c3) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #130   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          218       220    +2     
  Branches        30        30           
=========================================
+ Hits           218       220    +2     
Files Coverage Δ
sec_edgar_downloader/_orchestrator.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jadchaar jadchaar merged commit 8efafe1 into master Oct 8, 2023
21 checks passed
@jadchaar jadchaar deleted the fix-issue-with-def-14a branch October 8, 2023 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with downloading DEF 14A
1 participant