Skip to content

Commit

Permalink
fix: skipped logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Feb 17, 2024
1 parent 39eebd2 commit 65adfb3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion horde_sdk/ai_horde_api/apimodels/generate/_pop.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def validate_id(cls, v: str | JobID) -> JobID | str:
@model_validator(mode="after")
def ids_present(self) -> ImageGenerateJobPopResponse:
"""Ensure that either id_ or ids is present."""
if self.skipped.is_empty() and self.model is None:
if self.model is None:
if self.skipped.is_empty():
logger.debug("No model or skipped data found in response.")
else:
logger.debug("No model found in response.")
return self

if self.id_ is None and len(self.ids) == 0:
Expand Down

0 comments on commit 65adfb3

Please sign in to comment.