]> git.decadent.org.uk Git - dak.git/commitdiff
dak/admin.py: new suites need an archive
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 31 Jul 2012 17:09:17 +0000 (19:09 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Sat, 11 Aug 2012 11:43:04 +0000 (13:43 +0200)
dak/admin.py

index 23b4c2d8e1a05ff17e1d7f8aecb51dab9e75c24c..378a878a7d35c89a9f252ae0abbc60316f2d5d0c 100755 (executable)
@@ -225,6 +225,11 @@ def __suite_add(d, args, addallarches=False):
             signingkey = get_field('signingkey')
             if signingkey is not None:
                 suite.signingkeys = [signingkey.upper()]
+            archive_name = get_field('archive')
+            if archive_name is not None:
+                suite.archive = get_archive(archive_name, s)
+            else:
+                suite.archive = s.query(Archive).filter(~Archive.archive_name.in_(['build-queues', 'new', 'policy'])).one()
             suite.srcformats = s.query(SrcFormat).all()
             s.add(suite)
             s.flush()