1
0
Fork 0

Fix repo saving

ID was not saved to the database
This commit is contained in:
Gregory Eremin 2015-03-22 20:26:29 +07:00
parent 34ca694242
commit a43c5909a5
1 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ type Repo struct {
func (r *Repo) Save() { func (r *Repo) Save() {
defer measure(time.Now(), "SaveRepo") defer measure(time.Now(), "SaveRepo")
mustExecN(` mustExecN(`
insert into repos (org_id, name, description, is_private, is_fork, updated_at) insert into repos (id, org_id, name, description, is_private, is_fork, updated_at)
values (:org_id, :name, :description, :is_private, :is_fork, now()) values (:id, :org_id, :name, :description, :is_private, :is_fork, now())
on duplicate key update on duplicate key update
org_id = values(org_id), org_id = values(org_id),
name = values(name), name = values(name),