From 3cf2cd4684d03d52415ca6cb16ebbba89c809ed9 Mon Sep 17 00:00:00 2001 From: woodsaj Date: Tue, 15 Sep 2015 17:10:16 +0800 Subject: [PATCH] be sure to pass result obj by reference to xorm. --- pkg/services/sqlstore/quota.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/services/sqlstore/quota.go b/pkg/services/sqlstore/quota.go index 23bea264e87..afc3c028dcf 100644 --- a/pkg/services/sqlstore/quota.go +++ b/pkg/services/sqlstore/quota.go @@ -26,7 +26,7 @@ func GetOrgQuotaByTarget(query *m.GetOrgQuotaByTargetQuery) error { Target: query.Target, OrgId: query.OrgId, } - has, err := x.Get(quota) + has, err := x.Get("a) if err != nil { return err } else if has == false { @@ -100,7 +100,7 @@ func UpdateOrgQuota(cmd *m.UpdateOrgQuotaCmd) error { Target: cmd.Target, OrgId: cmd.OrgId, } - has, err := sess.Get(quota) + has, err := sess.Get("a) if err != nil { return err } @@ -126,7 +126,7 @@ func GetUserQuotaByTarget(query *m.GetUserQuotaByTargetQuery) error { Target: query.Target, UserId: query.UserId, } - has, err := x.Get(quota) + has, err := x.Get("a) if err != nil { return err } else if has == false { @@ -200,7 +200,7 @@ func UpdateUserQuota(cmd *m.UpdateUserQuotaCmd) error { Target: cmd.Target, UserId: cmd.UserId, } - has, err := sess.Get(quota) + has, err := sess.Get("a) if err != nil { return err }