Skip to content

Commit

Permalink
Fix forms before uploading by removing the default="true()" attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed May 31, 2017
1 parent 4dbf223 commit e2a6955
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/fn/upload-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ module.exports = (project, couchUrl) => {

const xml = fs.read(`${formDir}/xml`);

// FIXME here we fix the form content before uploading it. Seeing as we
// have our own fork of pyxform, we should actually be doing this fixing
// there. TODO move this fix to pyxform once form conversion is
// integrated with this tool.
// TODO This is not how you should modify XML
xml = xml.replace(/ default="true\(\)"/g, '');

const id = readIdFrom(xml);
if(id !== expectedId) warn('DEPRECATED', 'Form:', xls, 'Bad ID set in XML. Expected:', expectedId, 'but saw:', id, ' Support for setting these values differently will be dropped. Please see https://github.com/medic/medic-webapp/issues/3342.');

Expand Down

0 comments on commit e2a6955

Please sign in to comment.