Skip to content

Commit

Permalink
Apply hack functiomn to student-registration and class-registration f…
Browse files Browse the repository at this point in the history
…orms
  • Loading branch information
esurface committed May 28, 2024
1 parent 56807df commit b6402f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/src/modules/mysql-js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ module.exports = {
primaryKey = 'ID'
createFunction = function (t) {
t.engine('InnoDB')
t.string(primaryKey, 36).notNullable().primary();
t.string(primaryKey, 200).notNullable().primary();
t.string('caseId', 36) // .index('response_caseId_IDX');
t.string('participantID', 36) //.index('case_instances_ParticipantID_IDX');
t.string('caseEventId', 36) // .index('eventform_caseEventId_IDX');
Expand Down Expand Up @@ -348,7 +348,9 @@ const generateFlatResponse = async function (formResponse, sanitized) {
flatFormResponse['formId'] = formResponse.form.id
}

if (formResponse.type === 'attendance' || formResponse.type === 'behavior' || formResponse.type === 'scores') {
if (formResponse.type === 'attendance' || formResponse.type === 'behavior' || formResponse.type === 'scores' ||
formResponse.form.id === 'student-registration' ||
formResponse.form.id === 'class-registration') {

function hackFunctionToRemoveUserProfileId (formResponse) {
// This is a very special hack function to remove userProfileId
Expand Down

0 comments on commit b6402f1

Please sign in to comment.