remove unneeded query of all objects
This commit is contained in:
@@ -53,7 +53,6 @@ def new_condition():
|
||||
db.session.add(condition)
|
||||
db.session.commit()
|
||||
st.SetMessage( "Created new Condition (id={})".format(condition.id) )
|
||||
conditions = Condition.query.order_by('id').all()
|
||||
return redirect( '/conditions' )
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -53,7 +53,6 @@ def new_covertype():
|
||||
db.session.add(covertype)
|
||||
db.session.commit()
|
||||
st.SetMessage( "Created new Covertype (id={})".format(covertype.id) )
|
||||
covertypes = Covertype.query.order_by('id').all()
|
||||
return redirect( '/covertypes' )
|
||||
|
||||
################################################################################
|
||||
|
||||
1
genre.py
1
genre.py
@@ -53,7 +53,6 @@ def new_genre():
|
||||
db.session.add(genre)
|
||||
db.session.commit()
|
||||
st.SetMessage( "Created new Genre (id={})".format(genre.id) )
|
||||
genres = Genre.query.order_by('id').all()
|
||||
return redirect( '/genres' )
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -53,7 +53,6 @@ def new_publisher():
|
||||
db.session.add(publisher)
|
||||
db.session.commit()
|
||||
st.SetMessage( "Created new Publisher (id={})".format(publisher.id) )
|
||||
publishers = Publisher.query.order_by('id').all()
|
||||
return redirect( '/publishers' )
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -53,7 +53,6 @@ def new_rating():
|
||||
db.session.add(rating)
|
||||
db.session.commit()
|
||||
st.SetMessage( "Created new Rating (id={})".format(rating.id) )
|
||||
ratings = Rating.query.order_by('id').all()
|
||||
return redirect( '/ratings' )
|
||||
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user