Skip to content

Commit ce8bb4c

Browse files
committed
fix: get right datasource in ConceptExists
1 parent 98c0520 commit ce8bb4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/testutils.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ func RemoveConcept(sourceType models.SourceType, conceptId int64) {
195195
}
196196

197197
func ConceptExists(sourceType models.SourceType, conceptId int64) bool {
198-
dataSource := db.GetAtlasDB()
198+
var dataSourceModel = new(models.Source)
199+
dataSource := dataSourceModel.GetDataSource(GetTestSourceId(), sourceType)
199200
count := 0
200201
query := fmt.Sprintf("SELECT COUNT(*) FROM %s.concept WHERE concept_id = ?", GetSchemaNameForType(sourceType))
201202
dataSource.Db.Raw(query, conceptId).Scan(&count)

0 commit comments

Comments
 (0)