be sure to pass result obj by reference to xorm.

This commit is contained in:
woodsaj 2015-09-15 17:10:16 +08:00
parent 6488324cf1
commit 3cf2cd4684

View File

@ -26,7 +26,7 @@ func GetOrgQuotaByTarget(query *m.GetOrgQuotaByTargetQuery) error {
Target: query.Target, Target: query.Target,
OrgId: query.OrgId, OrgId: query.OrgId,
} }
has, err := x.Get(quota) has, err := x.Get(&quota)
if err != nil { if err != nil {
return err return err
} else if has == false { } else if has == false {
@ -100,7 +100,7 @@ func UpdateOrgQuota(cmd *m.UpdateOrgQuotaCmd) error {
Target: cmd.Target, Target: cmd.Target,
OrgId: cmd.OrgId, OrgId: cmd.OrgId,
} }
has, err := sess.Get(quota) has, err := sess.Get(&quota)
if err != nil { if err != nil {
return err return err
} }
@ -126,7 +126,7 @@ func GetUserQuotaByTarget(query *m.GetUserQuotaByTargetQuery) error {
Target: query.Target, Target: query.Target,
UserId: query.UserId, UserId: query.UserId,
} }
has, err := x.Get(quota) has, err := x.Get(&quota)
if err != nil { if err != nil {
return err return err
} else if has == false { } else if has == false {
@ -200,7 +200,7 @@ func UpdateUserQuota(cmd *m.UpdateUserQuotaCmd) error {
Target: cmd.Target, Target: cmd.Target,
UserId: cmd.UserId, UserId: cmd.UserId,
} }
has, err := sess.Get(quota) has, err := sess.Get(&quota)
if err != nil { if err != nil {
return err return err
} }