Skip to content

Commit

Permalink
fixup! Issue #332 introduce support for job listing pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Dec 5, 2024
1 parent 94a6124 commit 4a16872
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openeo_driver/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class JobListing:
# TODO: just implement as frozen dataclass, or does that conflict with later need to subclass?
__slots__ = ["_jobs", "_next_parameters"]

def __init__(self, jobs: List[BatchJobMetadata], next_parameters: Optional[dict]):
def __init__(self, jobs: List[BatchJobMetadata], next_parameters: Optional[dict] = None):
self._jobs = jobs
self._next_parameters = next_parameters

Expand Down Expand Up @@ -446,6 +446,7 @@ def get_user_jobs(
user_id: str,
limit: Optional[int] = None,
request_parameters: Optional[werkzeug.datastructures.MultiDict] = None,
# TODO #332 settle on returning just `JobListing` and eliminate other options/code paths.
) -> Union[List[BatchJobMetadata], dict, JobListing]:
"""
Get details about all batch jobs of a user
Expand Down

0 comments on commit 4a16872

Please sign in to comment.