Merge "Rename launchpad parameter to group"
diff --git a/jeepyb/cmd/manage_projects.py b/jeepyb/cmd/manage_projects.py
index 770fab5..634ce42 100644
--- a/jeepyb/cmd/manage_projects.py
+++ b/jeepyb/cmd/manage_projects.py
@@ -173,11 +173,13 @@
 def _get_group_uuid(group):
     """Wait for up to 10 seconds for the group to be created in the DB."""
     query = "SELECT group_uuid FROM account_groups WHERE name = %s"
+    con = jeepyb.gerritdb.connect()
     for x in range(10):
-        cursor = jeepyb.gerritdb.connect().cursor()
+        cursor = con.cursor()
         cursor.execute(query, group)
         data = cursor.fetchone()
         cursor.close()
+        con.commit()
         if data:
             return data[0]
         time.sleep(1)