diff options
Diffstat (limited to 'bin/acme/srtool_acme.py')
-rwxr-xr-x | bin/acme/srtool_acme.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/acme/srtool_acme.py b/bin/acme/srtool_acme.py index 0e33de0e..1aa1b911 100755 --- a/bin/acme/srtool_acme.py +++ b/bin/acme/srtool_acme.py @@ -99,7 +99,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 @@ -107,9 +107,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() ################################# |