Skip to content
Snippets Groups Projects
Commit 216836e5 authored by erichard's avatar erichard
Browse files

customable labelstower : replace selected attributs by select all attributs from element table.

I refactor the first sql statement to let the developper define is element structure.
The only mandatory attribut for element table will be id. The rest is up to the developper.
parent 0bc97348
No related branches found
No related tags found
1 merge request!67Customisable labelstower
......@@ -26,16 +26,12 @@ def get_selected_elements(id_mandatory_labels: int, id_forbiden_labels: str, num
if(number_of_mandatory_labels):
query = '''
SELECT
ELEMENT.id
, element_name
ELEMENT.*
FROM
ELEMENT
INNER JOIN
ELEMENT_LABEL
ON ELEMENT.id=ELEMENT_LABEL.id_element
INNER JOIN
LABEL
ON ELEMENT_LABEL.id_label=LABEL.id
WHERE
id_label IN ({})
AND
......@@ -46,10 +42,7 @@ def get_selected_elements(id_mandatory_labels: int, id_forbiden_labels: str, num
ELEMENT
INNER JOIN
ELEMENT_LABEL
ON ELEMENT.id=ELEMENT_LABEL.id_element
INNER JOIN
LABEL
ON ELEMENT_LABEL.id_label=LABEL.id
ON ELEMENT.id=ELEMENT_LABEL.id_element
WHERE
id_label IN ({}))
GROUP BY id_element
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment