diff options
Diffstat (limited to 'bin/yp/srtool_yp.py')
-rwxr-xr-x | bin/yp/srtool_yp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/yp/srtool_yp.py b/bin/yp/srtool_yp.py index 6caa7863..338d4467 100755 --- a/bin/yp/srtool_yp.py +++ b/bin/yp/srtool_yp.py @@ -90,7 +90,7 @@ def init_products(source_file): defect_tags = Product_Item['defect_tags'] product_tags = Product_Item['product_tags'] - sql = "SELECT 1 FROM orm_product WHERE key = '%s'" % (key, ) + sql = "SELECT * FROM orm_product WHERE key = '%s'" % (key, ) product = cur.execute(sql).fetchone() if product is None: # NOTE: 'order' is a reserved SQL keyword, so we have to quote it @@ -98,9 +98,9 @@ def init_products(source_file): cur.execute(sql, (order, key, name, version, profile, cpe, defect_tags, product_tags)) else: sql = ''' UPDATE orm_product - SET "order" = ?, cpe= ?, defect_tags=?, product_tags=? + SET "order" = ?, key = ?, name = ?, version = ?, profile = ?, cpe= ?, defect_tags=?, product_tags=? WHERE id=?''' - cur.execute(sql, (order, cpe, defect_tags, product_tags, product[ORM.PRODUCT_ID])) + cur.execute(sql, (order, key, name, version, profile, cpe, defect_tags, product_tags, product[ORM.PRODUCT_ID])) conn.commit() ################################# |