Allow comment and defaults to be empty when editing a repo through the API

This commit is contained in:
Patrick Pokatilo
2016-12-08 02:14:31 +01:00
parent b6327ecc43
commit fb27fb01ea

View File

@@ -79,15 +79,9 @@ func apiReposEdit(c *gin.Context) {
return
}
if b.Comment != "" {
repo.Comment = b.Comment
}
if b.DefaultDistribution != "" {
repo.DefaultDistribution = b.DefaultDistribution
}
if b.DefaultComponent != "" {
repo.DefaultComponent = b.DefaultComponent
}
repo.Comment = b.Comment
repo.DefaultDistribution = b.DefaultDistribution
repo.DefaultComponent = b.DefaultComponent
err = collection.Update(repo)
if err != nil {