Skip to content

Commit 4ca208b

Browse files
Revert combining children with no known school with home-schooled children
1 parent 90d3623 commit 4ca208b

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

app/controllers/school.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ export const schoolController = {
1818
},
1919

2020
readAll(request, response, next) {
21-
// Combine children with no known school with home-schooled children)
22-
response.locals.schools = School.findAll(request.session.data).filter(
23-
(school) => school.id !== '888888'
24-
)
21+
response.locals.schools = School.findAll(request.session.data)
2522

2623
next()
2724
},

app/models/school.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ export class School extends Location {
3232
this.phase = options?.phase
3333
this.yearGroups = options?.yearGroups || []
3434
this.homeOrUnknown = ['888888', '999999'].includes(this.urn)
35-
36-
if (this.homeOrUnknown) {
37-
this.name = 'No known school (including home-schooled children)'
38-
}
3935
}
4036

4137
/**
@@ -67,13 +63,6 @@ export class School extends Location {
6763
*/
6864
get patients() {
6965
if (this.context?.patients && this.id) {
70-
// Combine children with no known school with home-schooled children)
71-
if (this.homeOrUnknown) {
72-
return Object.values(this.context?.patients)
73-
.filter(({ school_id }) => ['888888', '999999'].includes(school_id))
74-
.map((patient) => new Patient(patient, this.context))
75-
}
76-
7766
return Object.values(this.context?.patients)
7867
.filter(({ school_id }) => school_id === this.id)
7968
.map((patient) => new Patient(patient, this.context))

0 commit comments

Comments
 (0)