[#162,app,multiview][s]: minor refactoring to bring up to date with new model/backend setup.

This commit is contained in:
Rufus Pollock
2012-06-24 15:04:01 +01:00
parent d48115d274
commit f30c7d6273
2 changed files with 11 additions and 12 deletions

View File

@@ -182,10 +182,9 @@ my.MultiView = Backbone.View.extend({
// retrieve basic data like fields etc
// note this.model and dataset returned are the same
// TODO: set query state ...?
this.model.queryState.set(self.state.get('query'), {silent: true});
this.model.fetch()
.done(function(dataset) {
self.model.query(self.state.get('query'));
})
.fail(function(error) {
self.notify({message: error.message, category: 'error', persist: true});
});