mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Fix integer issues for custom css not creating
This commit is contained in:
parent
e5f7a90773
commit
45f33971ed
@ -373,4 +373,5 @@ def new_custom_css_post():
|
|||||||
css = None
|
css = None
|
||||||
css = UserCSS(name, user_id, variables_enabled, variables, css)
|
css = UserCSS(name, user_id, variables_enabled, variables, css)
|
||||||
db.session.add(css)
|
db.session.add(css)
|
||||||
|
db.session.commit()
|
||||||
return jsonify({"id": css.id})
|
return jsonify({"id": css.id})
|
@ -119,6 +119,7 @@ def new_custom_css_post():
|
|||||||
css = None
|
css = None
|
||||||
css = UserCSS(name, user_id, variables_enabled, variables, css)
|
css = UserCSS(name, user_id, variables_enabled, variables, css)
|
||||||
db.session.add(css)
|
db.session.add(css)
|
||||||
|
db.session.commit()
|
||||||
return jsonify({"id": css.id})
|
return jsonify({"id": css.id})
|
||||||
|
|
||||||
@user.route("/custom_css/edit/<css_id>", methods=["GET"])
|
@user.route("/custom_css/edit/<css_id>", methods=["GET"])
|
||||||
@ -130,7 +131,7 @@ def edit_custom_css_get(css_id):
|
|||||||
css = db.session.query(UserCSS).filter(UserCSS.id == css_id).first()
|
css = db.session.query(UserCSS).filter(UserCSS.id == css_id).first()
|
||||||
if not css:
|
if not css:
|
||||||
abort(404)
|
abort(404)
|
||||||
if css.user_id != session['user_id']:
|
if str(css.user_id) != str(session['user_id']):
|
||||||
abort(403)
|
abort(403)
|
||||||
variables = css.css_variables
|
variables = css.css_variables
|
||||||
if variables:
|
if variables:
|
||||||
|
Loading…
Reference in New Issue
Block a user