fix: add IS_CHANGED to ProjectKey and document source_label usage

ProjectKey fetches live API data, so it must re-execute on every queue.
Added comment explaining why source_label exists but is unused in Python.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 11:42:15 +01:00
parent 545b864c08
commit 2cf8cc1f0a
+6
View File
@@ -255,9 +255,15 @@ class ProjectKey:
CATEGORY = "utils/json/project" CATEGORY = "utils/json/project"
OUTPUT_NODE = False OUTPUT_NODE = False
@classmethod
def IS_CHANGED(cls, **kwargs):
return float("nan") # Always re-fetch from API
def fetch_key(self, source_label, key_name, key_type, def fetch_key(self, source_label, key_name, key_type,
manager_url="http://localhost:8080", project_name="", manager_url="http://localhost:8080", project_name="",
file_name="", sequence_number=1): file_name="", sequence_number=1):
# source_label is used by JS to identify which ProjectSource to sync
# config from. The actual config arrives via the optional widgets below.
data = _fetch_data(manager_url, project_name, file_name, sequence_number) data = _fetch_data(manager_url, project_name, file_name, sequence_number)
if data.get("error") in ("http_error", "network_error", "parse_error"): if data.get("error") in ("http_error", "network_error", "parse_error"):
msg = data.get("message", "Unknown error") msg = data.get("message", "Unknown error")