sqlite: fix AllContainers with state
The state has been unmarshalled into the config which surfaced in wrong states. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
		
							parent
							
								
									21fcc9070f
								
							
						
					
					
						commit
						1b1cdfa357
					
				| 
						 | 
				
			
			@ -736,8 +736,8 @@ func (s *SQLiteState) AllContainers(loadState bool) ([]*Container, error) {
 | 
			
		|||
			if err := json.Unmarshal([]byte(configJSON), ctr.config); err != nil {
 | 
			
		||||
				return nil, fmt.Errorf("unmarshalling container config: %w", err)
 | 
			
		||||
			}
 | 
			
		||||
			if err := json.Unmarshal([]byte(stateJSON), ctr.config); err != nil {
 | 
			
		||||
				return nil, fmt.Errorf("unmarshalling container %s config: %w", ctr.ID(), err)
 | 
			
		||||
			if err := json.Unmarshal([]byte(stateJSON), ctr.state); err != nil {
 | 
			
		||||
				return nil, fmt.Errorf("unmarshalling container %s state: %w", ctr.ID(), err)
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			ctrs = append(ctrs, ctr)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue