diff --git a/update_db.js b/update_db.js index 9c79452..74d65a7 100644 --- a/update_db.js +++ b/update_db.js @@ -1734,7 +1734,6 @@ function addFooterDivIdForConnect() { function addFooterDivIdForCommunities() { // db.page.save({ "route" : "/", "name" : "Home", "type" : "other", "entities" : [ ], "portalType" : "community", "top" : false, "bottom" : false, "left" : false, "right" : false }); // print("page 'Home' added for communities"); - addHomePageInCommunities(); communityHomePageID = db.page.find({"portalType": "community", "route": "/"}).map( function(community) { return community._id.str; } ).toString(); db.divId.save({ "name" : "footer", "pages" : [ communityHomePageID ], "portalType" : "community" }); @@ -1751,7 +1750,7 @@ function addHomePageInCommunities() { community_pages[communityHomePageID] = true; community_pid = communities[i].pid; - db.community.update({ "pid" : community_pid },{$set: { "pages": community_pages}}); + db.portal.update({ "pid" : community_pid },{$set: { "pages": community_pages}}); print("Add home page with id " + communityHomePageID + " on community " + community_pid); } } @@ -1913,8 +1912,9 @@ use openaireconnect; // 03-06-2021 addFooterDivIdForConnect(); -addFooterDivIdForCommunities(); addFooterHelpTextForConnect(); +addHomePageInCommunities(); +addFooterDivIdForCommunities(); addFooterHelpTextForCommunities(); // 04-06-2021 debug helper function