mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 00:17:34 -05:00 
			
		
		
		
	Fixes for company import
This commit is contained in:
		
							parent
							
								
									0ef1a83300
								
							
						
					
					
						commit
						d337073355
					
				@ -385,7 +385,7 @@ class CompanyImport implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        foreach($this->importables as $import){
 | 
					        foreach($this->importables as $import){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $method = "import_{$import} ";
 | 
					            $method = "import_{$import}";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            nlog($method);
 | 
					            nlog($method);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1147,6 +1147,10 @@ class CompanyImport implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        foreach($this->backup_file->{$object_property} as $obj)
 | 
					        foreach($this->backup_file->{$object_property} as $obj)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if(is_null($obj))
 | 
				
			||||||
 | 
					                continue;
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
            /* Remove unwanted keys*/
 | 
					            /* Remove unwanted keys*/
 | 
				
			||||||
            $obj_array = (array)$obj;
 | 
					            $obj_array = (array)$obj;
 | 
				
			||||||
            foreach($unset as $un){
 | 
					            foreach($unset as $un){
 | 
				
			||||||
@ -1274,7 +1278,8 @@ class CompanyImport implements ShouldQueue
 | 
				
			|||||||
            // nlog($this->ids[$resource]);
 | 
					            // nlog($this->ids[$resource]);
 | 
				
			||||||
            nlog("searching for {$old} in {$resource}");
 | 
					            nlog("searching for {$old} in {$resource}");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            nlog("If we are missing a user - default to the company owner")
 | 
					            nlog("If we are missing a user - default to the company owner");
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
            if($resource == 'users')
 | 
					            if($resource == 'users')
 | 
				
			||||||
                return $this->company_owner->id;
 | 
					                return $this->company_owner->id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user