File tree Expand file tree Collapse file tree
alembic_migration/versions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ def upgrade():
201201 # using the best route rating for each activity associated with the outing
202202 connection = op .get_bind ()
203203 raw_file = join (dirname (__file__ ), '24f8da659c78_outings.sql' )
204- f = codecs .open (raw_file , encoding = 'utf-8' )
205- content = f .read ()
204+ with codecs .open (raw_file , encoding = 'utf-8' ) as f :
205+ content = f .read ()
206206 connection .execute (text (content ))
207207
208208 # we loop over every existing outing
Original file line number Diff line number Diff line change @@ -140,9 +140,12 @@ def collection_delete(self):
140140 return {}
141141
142142 def _load (self , association_in ):
143- return DBSession .query (Association ). \
144- get ((association_in .parent_document_id ,
145- association_in .child_document_id ))
143+ return DBSession .query (Association ).filter (
144+ Association .parent_document_id ==
145+ association_in .parent_document_id ,
146+ Association .child_document_id ==
147+ association_in .child_document_id
148+ ).first ()
146149
147150
148151def _check_required_associations (association ):
You can’t perform that action at this time.
0 commit comments