update import
This commit is contained in:
parent
167fe9e95e
commit
c2cec30113
@ -739,7 +739,8 @@ def import_csv():
|
|||||||
file = request.files['file']
|
file = request.files['file']
|
||||||
for row in DictReader(codecs.iterdecode(file, 'utf-8')):
|
for row in DictReader(codecs.iterdecode(file, 'utf-8')):
|
||||||
numberadded = 0;
|
numberadded = 0;
|
||||||
book = Book.query.filter_by(title=row['title']).first()
|
book = db.session.query(Book).filter(Book.title==row['title']).first()
|
||||||
|
#book = Book.query.filter_by(title=row['title']).first()
|
||||||
if book:
|
if book:
|
||||||
print("allreadyexists")
|
print("allreadyexists")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user