Skip to content

Commit

Permalink
W-17092332: Fix for updating functions without is_public set (#650)
Browse files Browse the repository at this point in the history
* updating check for public on update to take into account functions that never had is public set
  • Loading branch information
jmoens authored Oct 31, 2024
1 parent bdb53ac commit cde3b0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tabpy/tabpy_server/management/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ def update_endpoint(
endpoint_type, endpoint_info["type"])
dependencies = self._check_and_set_dependencies(
dependencies, endpoint_info.get("dependencies", []))
is_public = self._check_and_set_is_public(is_public, endpoint_info["is_public"])
# Adding is_public means that some existing functions do not have is_public set.
# We need to check for this when updating and set to False by default
is_public = self._check_and_set_is_public(
is_public, getattr(endpoint_info, "is_public", False))

self._check_target(target)
if target and target not in endpoints:
Expand Down

0 comments on commit cde3b0d

Please sign in to comment.