Skip to content

v1.2.1 - Fix PolicyRule sources/destinations type

Choose a tag to compare

@drtinkerer drtinkerer released this 28 Mar 00:30
· 10 commits to main since this release
ac4a7c6

Bug Fixes

  • PolicyRule sources / destinations — Fixed incorrect type that caused 400 "couldn't parse JSON request" when creating/updating policies.

    The NetBird API expects plain string group IDs on writes but returns full objects on reads. Changed from List[Dict] to List[Union[str, Dict]].

    Before (broken):

    rule = PolicyRule(
        sources=[{"id": "group-id"}],  # 400 error
        ...
    )

    After (correct):

    rule = PolicyRule(
        sources=["group-id"],  # works
        ...
    )