From: Chris Lamb Date: Tue, 27 Oct 2009 14:51:21 +0000 (+0000) Subject: Use the format id. not its name. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c7c8845ba30ae85972d4fa3ec201ebfc646f408;p=dak Use the format id. not its name. Signed-off-by: Chris Lamb --- diff --git a/dak/dakdb/update15.py b/dak/dakdb/update15.py index 6b2e0ee2..6c000830 100644 --- a/dak/dakdb/update15.py +++ b/dak/dakdb/update15.py @@ -61,8 +61,10 @@ def do_update(self): print "Authorize format 1.0 on all suites by default" c.execute("SELECT id FROM suite") suites = c.fetchall() + c.execute("SELECT id FROM src_format WHERE format_name == '1.0'") + formats = c.fetchall() for s in suites: - c.execute("INSERT INTO suite_src_formats (suite, src_format) VALUES(%s, %s)", (s[0], '1.0')) + c.execute("INSERT INTO suite_src_formats (suite, src_format) VALUES(%s, %s)", (s[0], f[0])) print "Authorize all other formats on tpu, unstable & experimental by default" c.execute("SELECT id FROM suite WHERE suite_name IN ('testing-proposed-updates', 'unstable', 'experimental')")