Skip to content

Commit 2d0b964

Browse files
Merge pull request #300 from IntersectMBO/feat/Sorting-Icon-(#2650)
fix: Update proposal-content relationship to many-to-one in schema
2 parents 46ab27e + 3f33ace commit 2d0b964

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

backend/src/api/migration/controllers/migration.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -841,9 +841,6 @@ module.exports = {
841841
.query("api::proposal-content.proposal-content")
842842
.findMany({
843843
populate: { proposal: true },
844-
where: {
845-
proposal: null,
846-
},
847844
});
848845

849846
let result = {

backend/src/api/proposal-content/content-types/proposal-content/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@
8181
},
8282
"proposal": {
8383
"type": "relation",
84-
"relation": "oneToOne",
84+
"relation": "manyToOne",
8585
"target": "api::proposal.proposal",
86-
"inversedBy": "proposal_content"
86+
"inversedBy": "proposal_contents"
8787
}
8888
}
8989
}

backend/src/api/proposal/content-types/proposal/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
"type": "string",
2929
"required": true
3030
},
31-
"proposal_content": {
31+
"proposal_contents": {
3232
"type": "relation",
33-
"relation": "oneToOne",
33+
"relation": "oneToMany",
3434
"target": "api::proposal-content.proposal-content",
3535
"mappedBy": "proposal"
3636
}

0 commit comments

Comments
 (0)