Skip to content

Commit

Permalink
fix: allow extra attribs for HordeAPIObject
Browse files Browse the repository at this point in the history
This makes this class consistent with `HordeAPIDataObject` and my intentions. Practically speaking, for forward compatibility and in a live situation we want to allow additional information to propagate from the API to an end user where possible.
  • Loading branch information
tazlin committed Nov 23, 2024
1 parent f5bc3b0 commit e68e623
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions horde_sdk/generic_api/apimodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,17 @@ def get_api_model_name(cls) -> str | None:
If none, there is no payload, such as for a GET request.
"""

model_config = ConfigDict(
frozen=True,
use_attribute_docstrings=True,
model_config = (
ConfigDict(
frozen=True,
use_attribute_docstrings=True,
extra="allow",
)
if not os.getenv("TESTS_ONGOING")
else ConfigDict(
frozen=True,
use_attribute_docstrings=True,
)
)


Expand Down

0 comments on commit e68e623

Please sign in to comment.