mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-04 05:10:40 +00:00
Allow comment and defaults to be empty when editing a repo through the API
This commit is contained in:
+3
-9
@@ -79,15 +79,9 @@ func apiReposEdit(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if b.Comment != "" {
|
repo.Comment = b.Comment
|
||||||
repo.Comment = b.Comment
|
repo.DefaultDistribution = b.DefaultDistribution
|
||||||
}
|
repo.DefaultComponent = b.DefaultComponent
|
||||||
if b.DefaultDistribution != "" {
|
|
||||||
repo.DefaultDistribution = b.DefaultDistribution
|
|
||||||
}
|
|
||||||
if b.DefaultComponent != "" {
|
|
||||||
repo.DefaultComponent = b.DefaultComponent
|
|
||||||
}
|
|
||||||
|
|
||||||
err = collection.Update(repo)
|
err = collection.Update(repo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user