From cde3b0d1cce6d35c831456fb35500b2585a9bbb6 Mon Sep 17 00:00:00 2001 From: jmoens <37249590+jmoens@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:34:02 -0700 Subject: [PATCH] W-17092332: Fix for updating functions without is_public set (#650) * updating check for public on update to take into account functions that never had is public set --- tabpy/tabpy_server/management/state.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tabpy/tabpy_server/management/state.py b/tabpy/tabpy_server/management/state.py index befa06ed..d5aeae35 100644 --- a/tabpy/tabpy_server/management/state.py +++ b/tabpy/tabpy_server/management/state.py @@ -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: