Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
cullenwatson committed Aug 28, 2023
1 parent edc2bf0 commit 093fb6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Imports directly into **Google Sheets**
- Optional JWT authorization

![jobspy_gsheet](https://github.com/cullenwatson/JobSpy/assets/78247585/66dba8e9-25d9-4c4e-a65d-dec047fb6aea)

### API

Expand Down
6 changes: 4 additions & 2 deletions api/core/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ class JobResponse(BaseModel):
success: bool
error: str = None

total_results: int = None

jobs: list[JobPost] = []

total_results: int = None
returned_results: int = None

@validator("returned_results")
@validator("returned_results", pre=True, always=True)
def set_returned_results(cls, v, values):
if v is None and values.get("jobs"):
return len(values["jobs"])
return v

0 comments on commit 093fb6c

Please sign in to comment.