mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-26 06:54:18 +00:00
Add commit
This commit is contained in:
parent
b713be87d5
commit
9645b7d007
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
if os.getenv('COOKIE_SECRET'):
|
if os.getenv('COOKIE_SECRET'):
|
||||||
app.secret_key = os.getenv('COOKIE_SECRET')
|
app.secret_key = os.getenv('COOKIE_SECRET')
|
||||||
|
|
|
@ -40,9 +40,10 @@ def page_repository_conditions(rid):
|
||||||
|
|
||||||
condition = Condition(content=content, type=type_)
|
condition = Condition(content=content, type=type_)
|
||||||
Base.session.add(condition)
|
Base.session.add(condition)
|
||||||
|
Base.session.commit()
|
||||||
|
|
||||||
use = Uses(cid=condition.id, rid=repository.id)
|
use = Uses(cid=condition.id, rid=repository.id)
|
||||||
Base.session.merge(use)
|
Base.session.merge(use)
|
||||||
|
|
||||||
Base.session.commit()
|
Base.session.commit()
|
||||||
|
|
||||||
return json_success(condition.to_json()), 200
|
return json_success(condition.to_json()), 200
|
||||||
|
|
Loading…
Reference in a new issue