Autopep8
This commit is contained in:
parent
32209620e1
commit
9675dd0bf2
5
app.py
5
app.py
@ -3,10 +3,10 @@
|
|||||||
# =========================
|
# =========================
|
||||||
# Librarys
|
# Librarys
|
||||||
# =========================
|
# =========================
|
||||||
|
from dotenv import load_dotenv, find_dotenv
|
||||||
import os
|
import os
|
||||||
from flask import Flask, request
|
from flask import Flask, request
|
||||||
from flask_restplus import Resource, Api
|
from flask_restplus import Resource, Api
|
||||||
from dotenv import load_dotenv, find_dotenv
|
|
||||||
from models import db, User, Notice, Comment
|
from models import db, User, Notice, Comment
|
||||||
from flask_marshmallow import Marshmallow
|
from flask_marshmallow import Marshmallow
|
||||||
|
|
||||||
@ -196,7 +196,8 @@ class NewsSingle(Resource):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
return {'message': 'No se ha podido guardar la información'}, 500
|
return {
|
||||||
|
'message': 'No se ha podido guardar la información'}, 500
|
||||||
else:
|
else:
|
||||||
return {'message': 'No existe la noticia'}, 400
|
return {'message': 'No existe la noticia'}, 400
|
||||||
return {'message': 'ok'}, 200
|
return {'message': 'ok'}, 200
|
||||||
|
Loading…
Reference in New Issue
Block a user