Skip to content

Commit

Permalink
fix the handling of a flowhub push
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit Riessen committed Oct 21, 2024
1 parent 193d13e commit 514eba1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions red/deadred.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,20 @@ var DEADRED = (function() {
url: RED.settings.get("dynamicServer", "") + "v1/flows",
data: JSON.stringify(postData),
success: (resp) => {
// update the revision of the flow locally if it has changed
// remotely
if ( resp.status == "nochange"
&& cfgNode.flowrevisions
&& cfgNode.flowrevisions[resp.flowid] != resp.revision
&& resp.revision != "") {
cfgNode.flowrevisions[resp.flowid] = resp.revision
}

// update of flow was made,
if ( resp.status == "ok" ) {
cfgNode.flowrevisions[resp.flowid] = resp.revision
}

RED.comms.emit([
{
topic: "flowhub:submission-result",
Expand Down

0 comments on commit 514eba1

Please sign in to comment.