Skip to content

Commit

Permalink
validate previous state first of all
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-har committed Nov 12, 2020
1 parent 890938c commit d71c10f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions export/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ func ExportBranchStart(paradeDB parade.Parade, cataloger catalog.Cataloger, repo
return "", err
}
err = cataloger.ExportState(repo, branch, commitRef, func(oldRef string, state catalog.CatalogBranchExportStatus) (newState catalog.CatalogBranchExportStatus, newMessage *string, err error) {
if state == catalog.ExportStatusInProgress {
return state, nil, ErrExportInProgress
}
config, err := cataloger.GetExportConfigurationForBranch(repo, branch)
if err != nil {
return "", nil, err
}
if state == catalog.ExportStatusInProgress {
return state, nil, ErrExportInProgress
}
tasks, err := GetStartTasks(repo, branch, oldRef, commitRef, exportID, config)
if err != nil {
return "", nil, err
Expand Down

0 comments on commit d71c10f

Please sign in to comment.