myproduct_data
This commit is contained in:
@@ -870,10 +870,12 @@ def subscription_start(current_user):
|
|||||||
cursor.execute(SELECT_LAST_ENTRY)
|
cursor.execute(SELECT_LAST_ENTRY)
|
||||||
select_pendingRes = cursor.fetchall()
|
select_pendingRes = cursor.fetchall()
|
||||||
# Assume data is there
|
# Assume data is there
|
||||||
|
addProvisionAction(member_id,select_pendingRes[0][1],'Started initial provision - '+ internal_url) # Create action Entry
|
||||||
print(select_pendingRes)
|
print(select_pendingRes)
|
||||||
print(select_pendingRes[0][0])
|
actionJS = json.dumps( [dict(ix) for ix in select_pendingRes] )
|
||||||
print(select_pendingRes[0][1])
|
print(actionJS)
|
||||||
addProvisionAction(member_id,select_pendingRes[0][1],'Started initial provision - '+ internal_url)
|
myproduct_data = json.loads(actionJS)
|
||||||
|
print(myproduct_data)
|
||||||
|
|
||||||
return jsonify(myproduct_data=myproduct_data)
|
return jsonify(myproduct_data=myproduct_data)
|
||||||
|
|
||||||
@@ -884,21 +886,7 @@ def addProvisionAction(member_id,product_uid,action):
|
|||||||
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||||
cursor.execute(INSERT_NEW_ACTION,val_insert)
|
cursor.execute(INSERT_NEW_ACTION,val_insert)
|
||||||
|
|
||||||
# pass
|
return 0
|
||||||
|
|
||||||
#
|
|
||||||
# CREATE TABLE provision_actions (
|
|
||||||
# id SERIAL,
|
|
||||||
# uid uuid DEFAULT uuid_generate_v4(),
|
|
||||||
# member_id INT REFERENCES members(id),
|
|
||||||
# product_uid VARCHAR(100) NOT NULL,
|
|
||||||
# action VARCHAR(100) NOT NULL,
|
|
||||||
# added timestamp without time zone DEFAULT now()
|
|
||||||
# );
|
|
||||||
# ALTER TABLE ONLY provision_actions
|
|
||||||
# ADD CONSTRAINT provision_actions_id_key UNIQUE (id);
|
|
||||||
#
|
|
||||||
|
|
||||||
@app.route("/panel/settings")
|
@app.route("/panel/settings")
|
||||||
def user_settings():
|
def user_settings():
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user