Skip to content
Snippets Groups Projects
Commit c70762bd authored by Lelieveld,J.R.J. (Joris)'s avatar Lelieveld,J.R.J. (Joris)
Browse files

Bugfix off by one in modifier connect

parent 424569fc
No related branches found
No related tags found
No related merge requests found
......@@ -159,9 +159,11 @@ func createQuery(JSONQuery *entity.IncomingQueryJSON) *string {
if modifier.SelectedType == "entity" {
// ASSUMING THERE IS ONLY 1 RELATION
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 {
// Otherwise take the depth.max -1 to get the last
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