Skip to content

Commit c171605

Browse files
committed
fix(inventory): null pointer
1 parent ff56025 commit c171605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/tasks/LocalJob_inventory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (t *LocalJob) tmpInventoryFilename() string {
4545
}
4646

4747
func (t *LocalJob) tmpInventoryFullPath() string {
48-
if t.Inventory.Repository.GetType() == db.RepositoryLocal {
48+
if t.Inventory.Repository != nil && t.Inventory.Repository.GetType() == db.RepositoryLocal {
4949
return t.Inventory.Repository.GetGitURL(true)
5050
}
5151
pathname := path.Join(util.Config.GetProjectTmpDir(t.Template.ProjectID), t.tmpInventoryFilename())

0 commit comments

Comments
 (0)