Use global Session from rattail (again).
				
					
				
			This commit is contained in:
		
							parent
							
								
									f3947dc6de
								
							
						
					
					
						commit
						d6f2b1afb1
					
				
					 2 changed files with 2 additions and 4 deletions
				
			
		|  | @ -141,8 +141,7 @@ class BatchCrud(CrudView): | ||||||
| class ExecuteBatch(View): | class ExecuteBatch(View): | ||||||
| 
 | 
 | ||||||
|     def execute_batch(self, batch, progress): |     def execute_batch(self, batch, progress): | ||||||
|         from rattail.db import get_session_class |         from rattail.db import Session | ||||||
|         Session = get_session_class(edbob.config) |  | ||||||
|         session = Session() |         session = Session() | ||||||
|         batch = session.merge(batch) |         batch = session.merge(batch) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -300,8 +300,7 @@ def print_labels(request): | ||||||
| class CreateProductsBatch(ProductsGrid): | class CreateProductsBatch(ProductsGrid): | ||||||
| 
 | 
 | ||||||
|     def make_batch(self, provider, progress): |     def make_batch(self, provider, progress): | ||||||
|         from rattail.db import get_session_class |         from rattail.db import Session | ||||||
|         Session = get_session_class(edbob.config) |  | ||||||
|         session = Session() |         session = Session() | ||||||
| 
 | 
 | ||||||
|         self._filter_config = self.filter_config() |         self._filter_config = self.filter_config() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar