1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 04:54:18 +00:00

Add commit

This commit is contained in:
Lorenzo Balugani 2021-05-02 22:51:12 +02:00
parent b713be87d5
commit 9645b7d007
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,6 @@
from flask import Flask
import os
app = Flask(__name__)
if os.getenv('COOKIE_SECRET'):
app.secret_key = os.getenv('COOKIE_SECRET')

View file

@ -40,9 +40,10 @@ def page_repository_conditions(rid):
condition = Condition(content=content, type=type_)
Base.session.add(condition)
Base.session.commit()
use = Uses(cid=condition.id, rid=repository.id)
Base.session.merge(use)
Base.session.commit()
return json_success(condition.to_json()), 200