From ec17c8829aba9977629b31f24b327f79cc0058c5 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 10 Jan 2025 11:01:52 -0500 Subject: [PATCH] product URL --- services/web/project/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/project/__init__.py b/services/web/project/__init__.py index 809bc16..b0487a3 100644 --- a/services/web/project/__init__.py +++ b/services/web/project/__init__.py @@ -759,8 +759,9 @@ def subscription_start(current_user): return jsonify({'status': "INVALID",'message': 'Error - Invalid product'}), 403 member_id = current_user['user']['member_id'] - INSERT_NEW_PRODUCT ="INSERT INTO members_products (member_id ,product_id,status) VALUES (%s, %s, %s)" - val_insert = (member_id, product_id,6) + internal_url = str(random.randint(10000, 9999)) + product_id + ".mermsemr.com" + INSERT_NEW_PRODUCT ="INSERT INTO members_products (member_id ,product_id,status,internal_url) VALUES (%s, %s, %s, %s)" + val_insert = (member_id, product_id,6,internal_url) with connection: with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor: cursor.execute(INSERT_NEW_PRODUCT,val_insert)