Shared node changes rebuild the flows whose published copy uses them, not their drafts
This commit is contained in:
@@ -355,12 +355,16 @@ class FlowStore:
|
||||
self._set_source_ref(flow, node_id, None)
|
||||
self._commit(f"Unshare node '{flow}.{node_id}'")
|
||||
|
||||
def usages(self, lib_name: str) -> list[str]:
|
||||
"""Every ``flow.node`` pointing at this shared source."""
|
||||
def usages(self, lib_name: str, draft: bool = True) -> list[str]:
|
||||
"""Every ``flow.node`` pointing at this shared source.
|
||||
|
||||
Read from the drafts the editor shows, or with ``draft`` off from the
|
||||
published flows the engine runs.
|
||||
"""
|
||||
used = []
|
||||
for name in self.list_flows():
|
||||
try:
|
||||
definition = self.read_flow(name, draft=True)
|
||||
definition = self.read_flow(name, draft=draft)
|
||||
except FlowNotFound:
|
||||
continue
|
||||
used += [
|
||||
|
||||
Reference in New Issue
Block a user