Fix batch actions not working on pending accounts (#10508)
This commit is contained in:
		
					parent
					
						
							
								3f036ac6b8
							
						
					
				
			
			
				commit
				
					
						5247ea4efd
					
				
			
		
					 4 changed files with 6 additions and 4 deletions
				
			
		|  | @ -8,11 +8,11 @@ module Admin | |||
|       @form = Form::AccountBatch.new | ||||
|     end | ||||
| 
 | ||||
|     def update | ||||
|     def batch | ||||
|       @form = Form::AccountBatch.new(form_account_batch_params.merge(current_account: current_account, action: action_from_button)) | ||||
|       @form.save | ||||
|     rescue ActionController::ParameterMissing | ||||
|       # Do nothing | ||||
|       flash[:alert] = I18n.t('admin.accounts.no_account_selected') | ||||
|     ensure | ||||
|       redirect_to admin_pending_accounts_path(current_params) | ||||
|     end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue