diff --git a/SQL/site_data.sql b/SQL/site_data.sql index b9d2403..4c363fa 100644 --- a/SQL/site_data.sql +++ b/SQL/site_data.sql @@ -599,11 +599,12 @@ INSERT INTO subscription_options_items (option_name,description,list_order) VALUES('PREMIUM001','',0); +DROP TABLE subscription_generative; CREATE TABLE subscription_generative( id SERIAL, uid uuid DEFAULT uuid_generate_v4(), - member_id INT REFERENCES members(id) UNIQUE NOT NULL, + member_id INT REFERENCES members(id), practice VARCHAR(100) NOT NULL, specialization VARCHAR(100) NOT NULL, product_id VARCHAR(25) NOT NULL, diff --git a/app/api/services/myproduct.py b/app/api/services/myproduct.py index 2864a7d..4a6c757 100644 --- a/app/api/services/myproduct.py +++ b/app/api/services/myproduct.py @@ -197,12 +197,10 @@ class MyProductsService(BaseService): # getting the url-name part url_name_part = str(random.randint(100000, 999999)) # Starr with random numbers - member_profile_data = MembersProfile.get_member_profile_by_profile_uid(uid) + member_profile_data = MembersProfile.get_member_profile_by_member_id(member_id) if member_profile_data and member_profile_data.url_name != None: url_name_part = member_profile_data.url_name - - product_id = validated_data.get('product_id') product_data = Products.get_product_by_product_id(product_id) configured_start_url = product_data.start_url