Commits

Anonymous committed 3797619

Unsabotage save_model()

Comments (0)

Files changed (1)

wdmmg/controllers/sources.py

                 if not c.error:
                     h.flash_success('Mapping validated OK!')
             else:
-                model_id = save_model(c.account, c.dataset, c.mapping)
+                model_id = save_model(c.account, dataset=c.dataset, mapping=c.mapping)
                 model = Model.by_id(model_id)
                 h.flash_success('Saved model')
                 if 'dryrun' in params:
     def mapping_save(self, package, resource):
         self._load_ckan(package, resource)
         mapping = dict(json.loads(unquote(request.body).strip('=')))
-        model = save_model(c.account, c.dataset, mapping)
+        model = save_model(c.account, dataset=c.dataset, mapping=mapping)
         return json.dumps({"url": h.url_for(
                     controller='sources',
                     action='load',