From 28f2fdc87d4561228825412edde7eff7cf68c2dc Mon Sep 17 00:00:00 2001 From: "Ole Mathias Aa. Heggem" Date: Mon, 15 Apr 2019 21:51:22 +0100 Subject: tag fix in switches write --- web/api/write/switches | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web/api/write') diff --git a/web/api/write/switches b/web/api/write/switches index 1f91d48..e0ee950 100755 --- a/web/api/write/switches +++ b/web/api/write/switches @@ -63,6 +63,11 @@ foreach my $tmp2 (@tmp) { } else { %placement = %{convertplace($switch{'placement'})}; } + if (defined($switch{'tags'})) { + # MY GOD I HATE THIS + # But I'm too lazy to improve it more for now. + $switch{'tags'} = "[". join(",", map { "\"".$_."\"" } @{$switch{'tags'}})."]"; + } my ($x1,$x2,$y1,$y2); $x1 = $placement{'x1'}; $y1 = $placement{'y1'}; -- cgit v1.2.3