Skip to content

Commit

Permalink
Merge pull request #1439 from culturecreates/bugfix/issue-1438
Browse files Browse the repository at this point in the history
fix: added source check for imports from footlight entities
  • Loading branch information
AbhishekPAnil authored Nov 11, 2024
2 parents 94400d6 + f369c31 commit 66127f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,10 @@ function CreateNewPlace() {
];
}
if (values?.containedInPlace || values?.containedInPlace?.length > 0) {
if (containedInPlace?.source === sourceOptions.CMS)
if (
containedInPlace?.source === sourceOptions.CMS ||
containedInPlace?.source === externalSourceOptions.FOOTLIGHT
)
containedInPlaceObj = {
entityId: values?.containedInPlace,
};
Expand All @@ -510,7 +513,7 @@ function CreateNewPlace() {

if (values?.containsPlace) {
containsPlace = values?.containsPlace?.map((place) => {
if (place?.source === sourceOptions.CMS)
if (place?.source === sourceOptions.CMS || place?.source === externalSourceOptions.FOOTLIGHT)
return {
entityId: place?.value,
};
Expand Down

0 comments on commit 66127f1

Please sign in to comment.