Commit 3b154331 authored by Okhin's avatar Okhin
Browse files

The tag part was broken, it now correctly get distinct and non empty tags, creating all of them

parent c88a161b
Pipeline #2547 passed with stages
in 2 minutes and 53 seconds
......@@ -40,14 +40,14 @@ class Command(BaseCommand):
c = db.cursor(DictCursor)
# First, let's get the data from presse table.
# We're also grouping a lot of queries
presse = c.execute("""SELECT *, nr.body as body, GROUP_CONCAT(, ',') as tags
presse = c.execute("""SELECT *, nr.body as body, GROUP_CONCAT(DISTINCT as tags
FROM presse p
JOIN node n
ON n.nid = p.nid
JOIN node_revisions nr
ON nr.vid = n.vid
JOIN term_node tn
ON tn.nid = p.nid
ON tn.vid = n.vid
JOIN term_data t
ON t.tid = tn.tid
GROUP BY n.nid""")
......@@ -81,7 +81,7 @@ class Command(BaseCommand):
# Insert tags
# Publish or draft as needed
if item['published'] >= 1:
# Let's get the extracts
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment