Skip to content

Commit 4e125b0

Browse files
authored
Merge pull request #26 from openworm/fix/invalid_id_fetch_request
Fix/invalid id fetch request
2 parents 2e11c67 + 517b58c commit 4e125b0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/org/geppetto/datasources/ADataSourceService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ public void fetchVariable(String variableId) throws GeppettoDataSourceException
144144
{
145145
Variable fetchedVariable = VariablesFactory.eINSTANCE.createVariable();
146146
fetchedVariable.setId(variableId);
147-
getGeppettoModelAccess().addVariable(fetchedVariable);
148147
Query fetchVariableQuery = getConfiguration().getFetchVariableQuery();
149148
ExecuteQueryVisitor runQueryVisitor = new ExecuteQueryVisitor(fetchedVariable, getGeppettoModelAccess());
150149
runQueryVisitor.doSwitch(fetchVariableQuery);
150+
if( !(fetchedVariable.getAnonymousTypes().isEmpty()) || !(fetchedVariable.getTypes().isEmpty())) {
151+
getGeppettoModelAccess().addVariable(fetchedVariable);
152+
}
151153
}
152154

153155
/*

0 commit comments

Comments
 (0)