File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
frontend/src/containers/Person/components Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,12 @@ export const searchPersons = async (userQuery) => {
190190 if ( userQuery . split ( ' ' ) . length === 2 ) {
191191 const firstName = userQuery . split ( ' ' ) [ 0 ]
192192 const lastName = userQuery . split ( ' ' ) [ 1 ]
193- query = qb => qb . where ( 'firstname' , 'iLIKE' , `%${ firstName } %` )
193+ query = qb => qb . whereNotNull ( 'shibbolethId' )
194+ . andWhere ( 'firstname' , 'iLIKE' , `%${ firstName } %` )
194195 . andWhere ( 'lastname' , 'iLIKE' , `%${ lastName } %` )
195196 } else {
196- query = qb => qb . where ( 'email' , 'iLIKE' , `%${ userQuery } %` )
197+ query = qb => qb . whereNotNull ( 'shibbolethId' )
198+ . andWhere ( 'email' , 'iLIKE' , `%${ userQuery } %` )
197199 . orWhere ( 'firstname' , 'iLIKE' , `%${ userQuery } %` )
198200 . orWhere ( 'lastname' , 'iLIKE' , `%${ userQuery } %` )
199201 }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class PersonSwitcher extends Component {
4040
4141 < ul style = { { padding : 10 , margin : 0 } } >
4242 { this . state . persons . map ( person => (
43- < div key = { person . shibbolethId } >
43+ < div key = { person . shibbolethId || person . personId } >
4444 < button
4545 style = { { margin : 5 } }
4646 className = "ui white button"
You can’t perform that action at this time.
0 commit comments