]> git.decadent.org.uk Git - dak.git/commitdiff
fix up tbl handling
authorMark Hymers <mhy@debian.org>
Sun, 1 Nov 2009 09:27:37 +0000 (09:27 +0000)
committerMark Hymers <mhy@debian.org>
Sun, 1 Nov 2009 09:27:37 +0000 (09:27 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
daklib/dbconn.py

index adf119bc74f8379d05fc11b3d57e794068aa76f1..f7ed0a0a30be3f402112dcc31b920de22254d3f0 100644 (file)
@@ -2565,8 +2565,8 @@ class DBConn(object):
         )
 
         for table_name in tables:
-            table = Table('tbl_%s' % table_name, self.db_meta, autoload=True)
-            setattr(self, table_name, table)
+            table = Table(table_name, self.db_meta, autoload=True)
+            setattr(self, 'tbl_%s' % table_name, table)
 
     def __setupmappers(self):
         mapper(Architecture, self.tbl_architecture,
@@ -2663,8 +2663,8 @@ class DBConn(object):
                                                      primaryjoin=(self.tbl_changes.c.in_queue==self.tbl_policy_queue.c.id)),
                                  approved_for_id = self.tbl_changes.c.approved_for))
 
-        mapper(ChangePendingBinary, self.tbl_changes_pending_binary,
-               properties = dict(change_pending_binary_id = self.tbl_changes_pending_binary.c.id))
+        mapper(ChangePendingBinary, self.tbl_changes_pending_binaries,
+               properties = dict(change_pending_binary_id = self.tbl_changes_pending_binaries.c.id))
 
         mapper(ChangePendingFile, self.tbl_changes_pending_files,
                properties = dict(change_pending_file_id = self.tbl_changes_pending_files.c.id))