Skip to content

Commit

Permalink
CMS-566: Fix issue in which some seasons didn't have any dates at all (
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-oxd authored Dec 20, 2024
1 parent 7d60d3e commit 78d7179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/routes/api/seasons.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ router.get(
model: Dateable,
as: "dateable",
attributes: ["id"],
required: false,
include: [
// get all the dateRanges for this feature for this season and previous season
{
model: DateRange,
as: "dateRanges",
required: false,
attributes: ["id", "seasonId", "startDate", "endDate"],
include: [
{
Expand Down
2 changes: 1 addition & 1 deletion backend/strapi-sync/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export async function createDatesAndSeasons(datesData) {
strapiId: subAreaId,
});

if (feature) {
if (feature && feature.active) {
const featureTypeId = feature.featureTypeId;
const parkId = feature.parkId;
const operatingYear = item.attributes.operatingYear;
Expand Down

0 comments on commit 78d7179

Please sign in to comment.