File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ func ToAPIProject(ctx context.Context, project *project_model.Project) (*api.Pro
2121		Closed :       project .ClosedDateUnix .AsTime (),
2222	}
2323
24- 	_  =  project .LoadRepo (ctx )
24+ 	if  err  :=  project .LoadRepo (ctx ); err  !=  nil  {
25+ 		return  nil , err 
26+ 	}
2527	if  project .Repo  !=  nil  {
2628		apiProject .Repo  =  & api.RepositoryMeta {
2729			ID :       project .RepoID ,
@@ -31,7 +33,9 @@ func ToAPIProject(ctx context.Context, project *project_model.Project) (*api.Pro
3133		}
3234	}
3335
34- 	_  =  project .LoadCreator (ctx )
36+ 	if  err  :=  project .LoadCreator (ctx ); err  !=  nil  {
37+ 		return  nil , err 
38+ 	}
3539	if  project .Creator  !=  nil  {
3640		apiProject .Creator  =  & api.User {
3741			ID :       project .Creator .ID ,
@@ -40,7 +44,9 @@ func ToAPIProject(ctx context.Context, project *project_model.Project) (*api.Pro
4044		}
4145	}
4246
43- 	_  =  project .LoadOwner (ctx )
47+ 	if  err  :=  project .LoadOwner (ctx ); err  !=  nil  {
48+ 		return  nil , err 
49+ 	}
4450	if  project .Owner  !=  nil  {
4551		apiProject .Owner  =  & api.User {
4652			ID :       project .Owner .ID ,
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments