summary refs log tree commit diff stats
path: root/ganarchy/db.py
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2020-07-23 13:15:56 -0300
committerSoniEx2 <endermoneymod@gmail.com>2020-07-23 13:15:56 -0300
commitbdf5cb78b9d7daf702e0e05660580ab311473fdc (patch)
treefd5261bf6090e80a4eb146f0916b467310566aaa /ganarchy/db.py
parent6e3ac343e67adea503afef98651ea134526e0453 (diff)
Restore functionality feature/new-config
Everything works again, as far as I can tell.
Diffstat (limited to 'ganarchy/db.py')
-rw-r--r--ganarchy/db.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ganarchy/db.py b/ganarchy/db.py
index 37509a5..328b682 100644
--- a/ganarchy/db.py
+++ b/ganarchy/db.py
@@ -160,7 +160,7 @@ class Database:
         c = self.conn.cursor()
         c.execute('''
             CREATE TEMPORARY TABLE "repos" (
-                "url" TEXT PRIMARY KEY,
+                "url" TEXT,
                 "active" INT,
                 "branch" TEXT,
                 "project" TEXT
@@ -222,7 +222,7 @@ class Database:
             ''',
             activities
         )
-        conn.commit()
+        self.conn.commit()
         c.close()
 
     def list_projects(self):
@@ -282,7 +282,7 @@ class Database:
                         FROM "repos" "T3"
                         WHERE "active" AND "project" IS ?1
                     )
-                    GROUP BY "url"
+                    GROUP BY "url", "branch"
                     ORDER BY "e"
                 ''',
                 (project_commit,)
@@ -313,7 +313,7 @@ class Database:
                     AND "project" IS ?
                 ORDER BY "entry" ASC
             ''',
-            (url, branch, project)
+            (uri, branch, project_commit)
         ).fetchall()
         history = [x for [x] in history]
         c.close()