Reformat to follow PEP standards
This commit is contained in:
parent
8ae91f7ffa
commit
8c635adcc7
3
libdb.py
3
libdb.py
@ -24,7 +24,8 @@ def load_config():
|
|||||||
for param in params:
|
for param in params:
|
||||||
config[param[0]] = param[1]
|
config[param[0]] = param[1]
|
||||||
else:
|
else:
|
||||||
raise Exception('Section {0} not found in the {1} file'.format(section, filename))
|
raise Exception(
|
||||||
|
'Section {0} not found in the {1} file'.format(section, filename))
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ from flask_api import status
|
|||||||
|
|
||||||
from sqlalchemy.orm.exc import NoResultFound
|
from sqlalchemy.orm.exc import NoResultFound
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
from libdb import engine, Session, Location, ProductQuantity, Product, Brand
|
from libdb import Session, Location, ProductQuantity, Product, Brand
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__) # app is the Flask app
|
app = Flask(__name__) # app is the Flask app
|
||||||
@ -191,7 +191,8 @@ def api_create_brand():
|
|||||||
else:
|
else:
|
||||||
branddesc = None
|
branddesc = None
|
||||||
|
|
||||||
ins = sqlalchemy.insert(Brand).values(name=brandname, description=branddesc)
|
ins = sqlalchemy.insert(Brand).values(
|
||||||
|
name=brandname, description=branddesc)
|
||||||
print(f"ins is {ins}")
|
print(f"ins is {ins}")
|
||||||
session.execute(ins)
|
session.execute(ins)
|
||||||
print("executed ins")
|
print("executed ins")
|
||||||
|
Loading…
Reference in New Issue
Block a user