fix(build): fixed failing unit test

This commit is contained in:
Torkel Ödegaard
2016-10-01 17:36:56 +02:00
parent 4ec2377e09
commit 4a116ad4ad
2 changed files with 8 additions and 4 deletions
+1 -2
View File
@@ -60,9 +60,8 @@ func DeleteDataSource(cmd *m.DeleteDataSourceCommand) error {
func AddDataSource(cmd *m.AddDataSourceCommand) error {
return inTransaction(func(sess *xorm.Session) error {
existing := m.DataSource{OrgId: cmd.OrgId, Name: cmd.Name}
has, _ := x.Get(&existing)
has, _ := sess.Get(&existing)
if has {
return m.ErrDataSourceNameExists