Fix for importing library datasets into a new named history. Library datasets will no longer be imported into both the current history and the new named history ( only the latter ) in this scenario.

This commit is contained in:
Greg Von Kuster
2011-05-31 12:03:52 -04:00
parent 71cc5195d1
commit 9dede7be76
+3 -2
View File
@@ -1850,8 +1850,9 @@ class LibraryCommon( BaseController, UsesFormDefinitions ):
new_history.user = user
trans.sa_session.add( new_history )
trans.sa_session.flush()
target_history_ids.append( new_history.id )
if user:
target_history_ids = [ new_history.id ]
target_histories = [ new_history ]
elif user:
target_histories = [ hist for hist in map( trans.sa_session.query( trans.app.model.History ).get, target_history_ids ) if ( hist is not None and hist.user == user )]
else:
target_histories = [ current_history ]