From 0bf3429fd9a23f1218c47e6bf4ca67d126b6bf79 Mon Sep 17 00:00:00 2001 From: Aleksei Burlakov Date: Mon, 3 Feb 2025 12:58:08 +0100 Subject: [PATCH] Fix: enable colocation linking The shell_syntax function was created 10 years ago and the json parsing has changed. The set2[:sequential] used to be boolean and now it's string. TODO: tests. --- hawk/app/models/colocation.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hawk/app/models/colocation.rb b/hawk/app/models/colocation.rb index a8c5ef7eb..5be254a23 100644 --- a/hawk/app/models/colocation.rb +++ b/hawk/app/models/colocation.rb @@ -83,11 +83,11 @@ def shell_syntax end else collapsed.each do |set2| - cmd.push " ( " unless set2[:sequential] + cmd.push " ( " if set2[:sequential] == false or set2[:sequential] == "false" set2[:resources].reverse_each do |r| cmd.push r + (set2[:action].blank? ? "" : ":#{set2[:action]}") end - cmd.push " )" unless set2[:sequential] + cmd.push " )" if set2[:sequential] == false or set2[:sequential] == "false" end end