Skip to content

Commit

Permalink
Fix missing user fields
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPeck committed Dec 2, 2024
1 parent 19ddaa8 commit 54a1cd2
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ const User = types
encryptedCreds: types.maybeNull(types.string),
acceptedTerms: '1900-01-01T01:00:00.000Z',
applyReason: 'N/A',
studyAdmin: types.optional(types.array(types.string), []),
studyReadWrite: types.optional(types.array(types.string), []),
studyRead: types.optional(types.array(types.string), []),
dataSource: types.maybeNull(types.optional(types.string, '')),
aaAffiliation: types.maybeNull(types.optional(types.string, '')),
piName: types.maybeNull(types.optional(types.string, '')),
projectName: types.maybeNull(types.optional(types.string, '')),
})
.actions(self => ({
runInAction(fn) {
Expand Down Expand Up @@ -78,6 +85,13 @@ const User = types
self.encryptedCreds = rawUser.encryptedCreds || self.encryptedCreds;
self.applyReason = rawUser.applyReason || self.applyReason || '';
self.acceptedTerms = rawUser.acceptedTerms || self.acceptedTerms || '';
self.studyAdmin = rawUser.studyAdmin || self.studyAdmin || [];
self.studyReadWrite = rawUser.studyReadWrite || self.studyReadWrite || [];
self.studyRead = rawUser.studyRead || self.studyRead || [];
self.dataSource = rawUser.dataSource || self.dataSource || '';
self.aaAffiliation = rawUser.aaAffiliation || self.aaAffiliation || '';
self.piName = rawUser.piName || self.piName || '';
self.projectName = rawUser.projectName || self.projectName || '';
// we don't update the other fields because they are being populated by a separate store
},
}))
Expand Down

0 comments on commit 54a1cd2

Please sign in to comment.