@@ -1329,7 +1329,7 @@ func checkApplication(store cache.Store, db gorp.SqlExecutor, proj sdk.Project,
1329
1329
if n .Context .ApplicationName != "" {
1330
1330
appDB , err := application .LoadByName (db , store , proj .Key , n .Context .ApplicationName , application .LoadOptions .WithDeploymentStrategies , application .LoadOptions .WithVariables )
1331
1331
if err != nil {
1332
- if sdk .ErrorIs (err , sdk .ErrPipelineNotFound ) {
1332
+ if sdk .ErrorIs (err , sdk .ErrApplicationNotFound ) {
1333
1333
return sdk .WithStack (sdk .ErrorWithData (sdk .ErrApplicationNotFound , n .Context .ApplicationName ))
1334
1334
}
1335
1335
return sdk .WrapError (err , "unable to load application %s" , n .Context .ApplicationName )
@@ -1390,12 +1390,13 @@ func Push(ctx context.Context, db *gorp.DbMap, store cache.Store, proj *sdk.Proj
1390
1390
oldWf = opts .OldWorkflow
1391
1391
} else {
1392
1392
// load the workflow from database if exists
1393
- workflowExists , err = Exists (db , proj .Key , data .wrkflw .Name )
1393
+ workflowExists , err = Exists (db , proj .Key , data .wrkflw .GetName () )
1394
1394
if err != nil {
1395
1395
return nil , nil , nil , sdk .WrapError (err , "Cannot check if workflow exists" )
1396
1396
}
1397
1397
if workflowExists {
1398
- oldWf , err = Load (ctx , db , store , * proj , data .wrkflw .Name , LoadOptions {WithIcon : true })
1398
+ oldWf , err = Load (ctx , db , store , * proj , data .wrkflw .GetName (), LoadOptions {WithIcon : true })
1399
+
1399
1400
if err != nil {
1400
1401
return nil , nil , nil , sdk .WrapError (err , "Unable to load existing workflow" )
1401
1402
}
@@ -1477,9 +1478,9 @@ func Push(ctx context.Context, db *gorp.DbMap, store cache.Store, proj *sdk.Proj
1477
1478
importOptions .HookUUID = opts .HookUUID
1478
1479
}
1479
1480
1480
- wf , msgList , err := ParseAndImport (ctx , tx , store , * proj , oldWf , & data .wrkflw , u , importOptions )
1481
+ wf , msgList , err := ParseAndImport (ctx , tx , store , * proj , oldWf , data .wrkflw , u , importOptions )
1481
1482
if err != nil {
1482
- return msgList , nil , nil , sdk .WrapError (err , "unable to import workflow %s" , data .wrkflw .Name )
1483
+ return msgList , nil , nil , sdk .WrapError (err , "unable to import workflow %s" , data .wrkflw .GetName () )
1483
1484
}
1484
1485
1485
1486
// If the workflow is "as-code", it should always be linked to a git repository
0 commit comments