Skip to content
Snippets Groups Projects
Commit 8f7bf247 authored by Heijden,T.A.J. van der (Thijs)'s avatar Heijden,T.A.J. van der (Thijs)
Browse files

Merge branch 'Bugfix439' into 'main'

Bugfix off by one in modifier connect

See merge request datastrophe/query-conversion!3
parents 424569fc c70762bd
No related branches found
No related tags found
No related merge requests found
...@@ -159,9 +159,11 @@ func createQuery(JSONQuery *entity.IncomingQueryJSON) *string { ...@@ -159,9 +159,11 @@ func createQuery(JSONQuery *entity.IncomingQueryJSON) *string {
if modifier.SelectedType == "entity" { if modifier.SelectedType == "entity" {
// ASSUMING THERE IS ONLY 1 RELATION // ASSUMING THERE IS ONLY 1 RELATION
if JSONQuery.Relations[0].EntityFrom == modifier.ID { if JSONQuery.Relations[0].EntityFrom == modifier.ID {
pathDistinction = fmt.Sprintf(".vertices[%v]", JSONQuery.Relations[0].Depth.Min-1) // This should always be 0, because that is the start of the path
pathDistinction = ".vertices[0]"
} else { } else {
// Otherwise take the depth.max -1 to get the last
pathDistinction = fmt.Sprintf(".vertices[%v]", JSONQuery.Relations[0].Depth.Max) pathDistinction = fmt.Sprintf(".vertices[%v]", JSONQuery.Relations[0].Depth.Max)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment