Skip to content

Commit

Permalink
Corrected empty lists being returned instead of none for uniqued lists
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMcGrath committed Feb 6, 2025
1 parent 86046a6 commit b25f8ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tenable/io/sync/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def upper_if_exist(value: Any, default=None) -> Any:


UpperCaseStr = BeforeValidator(lambda v: str(v).upper() if v else None)
UniqueListSerializer = PlainSerializer(lambda v: list(set(v)))
UniqueListSerializer = PlainSerializer(
lambda v: list(set(v)) if v and len(v) > 0 else None
)
TruncListValidator = WrapValidator(trunc_list)

intpos = Annotated[int, Field(gt=0)]
Expand Down
2 changes: 1 addition & 1 deletion tenable/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "1.7.0"
version = "1.7.1"
version_info = tuple(int(d) for d in version.split("-")[0].split("."))

0 comments on commit b25f8ce

Please sign in to comment.