incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1432924 - /incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/model.py
Date Mon, 14 Jan 2013 14:05:29 GMT
Author: jure
Date: Mon Jan 14 14:05:28 2013
New Revision: 1432924

URL: http://svn.apache.org/viewvc?rev=1432924&view=rev
Log:
Don't auto populate predefined tables on product insert, higher level logic should take care
of that


Modified:
    incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/model.py

Modified: incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/model.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/model.py?rev=1432924&r1=1432923&r2=1432924&view=diff
==============================================================================
--- incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/model.py
(original)
+++ incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/model.py
Mon Jan 14 14:05:28 2013
@@ -83,20 +83,6 @@ class Product(ModelBase):
         q = Query.from_string(env, 'product=%s' % product)
         return q.execute()
 
-    def insert(self):
-        from trac import db_default
-        from multiproduct.dbcursor import TRANSLATE_TABLES
-        with self._env.db_transaction as db:
-            super(Product, self).insert()
-            for table, cols, vals in db_default.get_data(db):
-                if not table in TRANSLATE_TABLES:
-                    continue
-                self._env.product_aware = False
-                self._env.product_scope = self.prefix
-                db.executemany("INSERT INTO %s (%s) VALUES (%s)" % (table,
-                                                                    ','.join(cols),
-                                                                    ','.join(['%s'] * len(cols))),
vals)
-
 class ProductResourceMap(ModelBase):
     """Table representing the mapping of resources to their product"""
     _meta = {'table_name':'bloodhound_productresourcemap',



Mime
View raw message