Skip to content

Commit

Permalink
Save semantic query to backend if new (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Jul 29, 2021
1 parent 7b8028a commit 5536948
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/explorer/explorer-event-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class ExplorerEventController {
const query = modelToQuery(model.get('query'));
const items = new ItemGraph();
items.sparqlQuery(query);
if (model.isNew()) model.save();
const collection = new FlatItemCollection(items);
const resultsView = new SearchResultListView({
collection,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/semantic-search/semantic-search-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default class SemanticSearchView extends CompositeView<Query> {
});
semChannel.reply('branchout', this.branchout, this);
this.model = this.model || new Query();
semChannel.trigger('addUserQuery', this.model);
this.topChain = new Chain({ model: this.model.get('query') });
this.model.set('query', this.topChain.model);
this.render();
Expand Down

0 comments on commit 5536948

Please sign in to comment.