Skip to content

Commit

Permalink
Fix addition of tangerineModifiedOn and tangerineModifiedByUserId to …
Browse files Browse the repository at this point in the history
…mysql-js outputs
  • Loading branch information
esurface committed Jul 23, 2024
1 parent d8bf659 commit dde3f05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/modules/mysql-js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ const getItemValue = (doc, variableName) => {
const generateFlatResponse = async function (formResponse, sanitized) {
const groupId = formResponse.groupId;

// Anything added to this list need to be added to the valuesToRemove list in each of the convert_response function.
let flatFormResponse = {
_id: formResponse._id,
formTitle: formResponse.form.title,
Expand Down Expand Up @@ -782,7 +783,7 @@ async function convert_response(knex, doc, groupId, tableName) {


// # Delete the following keys;
const valuesToRemove = ['_id', '_rev','buildChannel','buildId','caseEventId','deviceId','eventFormId','eventId','groupId','participantId','startDatetime', 'startUnixtime']
const valuesToRemove = ['_id', '_rev','buildChannel','buildId','caseEventId','deviceId','eventFormId','eventId','groupId','participantId','startDatetime', 'startUnixtime', 'tangerineModifiedOn', 'tangerineModifiedByUserId']
valuesToRemove.forEach(e => delete doc[e]);
const cleanData = populateDataFromDocument(doc, data);
return cleanData
Expand Down

0 comments on commit dde3f05

Please sign in to comment.