Skip to content

Commit

Permalink
fix: project search query doesnt crash
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Feb 7, 2022
1 parent 8422fb1 commit bb32c2b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions migrations/20211212200953-fulltext-search.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
projectLink,
projectDeveloper,
sector,
coveredByNDC,
projectType,
projectTags,
ndcInformation,
Expand Down
4 changes: 4 additions & 0 deletions migrations/20211219182106-sqlite-triggers-projects.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
projectLink,
projectDeveloper,
sector,
coveredByNDC,
projectType,
projectTags,
ndcInformation,
Expand All @@ -36,6 +37,7 @@ module.exports = {
new.projectLink,
new.projectDeveloper,
new.sector,
new.coveredByNDC,
new.projectType,
new.projectTags,
new.ndcInformation,
Expand Down Expand Up @@ -68,6 +70,7 @@ module.exports = {
projectLink,
projectDeveloper,
sector,
coveredByNDC,
projectType,
projectTags,
ndcInformation,
Expand All @@ -88,6 +91,7 @@ module.exports = {
new.projectLink,
new.projectDeveloper,
new.sector,
new.coveredByNDC,
new.projectType,
new.projectTags,
new.ndcInformation,
Expand Down
2 changes: 1 addition & 1 deletion src/models/projects/projects.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Project extends Model {
.filter((col) => !['createdAt', 'updatedAt'].includes(col))
.filter(
(col) =>
![ProjectLocation, Label, Issuance, CoBenefit, RelatedProject]
!Project.getAssociatedModels()
.map((model) => model.name + 's')
.includes(col),
),
Expand Down

0 comments on commit bb32c2b

Please sign in to comment.