Skip to content

Commit

Permalink
use double quotes in sql script to prevent issue with single quote in
Browse files Browse the repository at this point in the history
project name
  • Loading branch information
NicolasCARPi committed Mar 11, 2024
1 parent 624cdd5 commit 11961d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions any2eln/labfolder/labfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ def __get_links_script(self) -> str:
INSERT INTO experiments_links (item_id, link_id)
SELECT
experiments.id,
(SELECT items.id FROM items WHERE title = '{category}' LIMIT 1)
(SELECT items.id FROM items WHERE title = "{category}" LIMIT 1)
FROM experiments
LEFT JOIN tags2entity ON tags2entity.item_id = experiments.id AND tags2entity.item_type = 'experiments'
LEFT JOIN tags ON tags2entity.tag_id = tags.id
WHERE tags.tag = '{category}';""")
WHERE tags.tag = "{category}";""")
return '\n'.join(lines)


Expand Down

0 comments on commit 11961d0

Please sign in to comment.