mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-11-12 14:31:02 +00:00
api: fix snasphot-pull
in the API, snapshotPull never finished reading the target repository within the async block. So the target was treated as an empty snapshot, and a pull would only carry over the content from the sources
This commit is contained in:
1 parent
f59b0d2b06
commit
f95153a7c9
1 file changed
+4
@@ -800,6 +800,10 @@ func apiSnapshotsPull(c *gin.Context) {
|
||||
if err != nil {
|
||||
return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, err
|
||||
}
|
||||
err = taskCollectionFactory.SnapshotCollection().LoadComplete(freshToSnapshot)
|
||||
if err != nil {
|
||||
return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, err
|
||||
}
|
||||
freshSourceSnapshot, err := taskCollectionFactory.SnapshotCollection().ByName(body.Source)
|
||||
if err != nil {
|
||||
return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, err
|
||||
|
||||
Reference in new issue
Block a user