Skip to content

Commit

Permalink
filing stocks fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leftmove committed Feb 6, 2025
1 parent c38ba58 commit 09949cb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions backend/routers/filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,10 @@ async def filings_info(cik: str):
@router.get("/info", status_code=200)
@cache(2)
async def filing_info(cik: str, access_number: str, include_filer: bool = False):
filing = database.find_filing(
cik, access_number, {"_id": 0, "cik": 0, "stocks": 0, "changes": 0}
)
filing = database.find_filing(cik, access_number, {"_id": 0, "cik": 1, "stocks": 1})
if filing is None:
raise HTTPException(detail="Filing not found.", status_code=404)

filer = database.find_filer(cik, {"_id": 0, "stocks": 0}) if include_filer else None
if filer is None and include_filer:
raise HTTPException(404, detail="Filer not found.")

status = database.find_log(cik, {"status": 1, "_id": 0})
if status is None:
raise HTTPException(404, detail="Filer log not found.")
Expand Down

0 comments on commit 09949cb

Please sign in to comment.