From 0a93f7c6525a256354b188f5ca918217def0ea29 Mon Sep 17 00:00:00 2001
From: stedif <stefano.difrischia@inaf.it>
Date: Thu, 27 Oct 2022 18:37:34 +0200
Subject: [PATCH] L2SS-1030: remove like statements

---
 .../tangostationcontrol/common/configuration.py          | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/tangostationcontrol/tangostationcontrol/common/configuration.py b/tangostationcontrol/tangostationcontrol/common/configuration.py
index 64a02bd70..b95a21d72 100644
--- a/tangostationcontrol/tangostationcontrol/common/configuration.py
+++ b/tangostationcontrol/tangostationcontrol/common/configuration.py
@@ -4,8 +4,7 @@ from itertools import islice
 
 DEVICE_PROPERTIES_QUERY = "SELECT device, property_device.name, property_device.value FROM property_device \
                         INNER JOIN device ON property_device.device = device.name \
-                        WHERE server LIKE '%' AND class LIKE '%' AND device LIKE '%' \
-                        AND class != 'DServer' \
+                        WHERE class != 'DServer' \
                         AND property_device.name != '__SubDevices' \
                         ORDER BY device, property_device.name, property_device.count ASC"
 
@@ -13,13 +12,11 @@ ATTRS_PROPERTIES_QUERY = "SELECT device, attribute, property_attribute_device.na
                         property_attribute_device.value \
                         FROM property_attribute_device \
                         INNER JOIN device ON property_attribute_device.device = device.name \
-                        WHERE server LIKE '%' AND class LIKE '%' AND device LIKE '%' \
-                        AND class != 'DServer' \
+                        WHERE class != 'DServer' \
                         ORDER BY device, property_attribute_device.name, property_attribute_device.count ASC"
 
 SERVER_QUERY = "SELECT server, class, name FROM device \
-            WHERE server LIKE '%' AND class LIKE '%' AND name LIKE '%' \
-            AND class != 'DServer' \
+            WHERE class != 'DServer' \
             ORDER BY server ASC"
 
 def get_db_data(db, tangodb_timeout:int = 10000):
-- 
GitLab