Commit f69d2e13 authored by zauberstuhl's avatar zauberstuhl

Do not update secret if repo record exists

parent c29f7902
......@@ -65,6 +65,7 @@ func (repo *Repo) CreateOrUpdate() error {
// NOTE you have to specify opt_in as extra update field
// since gorm will not update if bool is false
// see
repo.Secret = "" // set to default then it won't update
err = db.Model(repo).Where("id = ?", oldRecord.ID).
Update(repo).Update("opt_in", repo.OptIn).Error
if err != nil {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment