Skip to content

Commit

Permalink
#126: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Sep 19, 2024
1 parent 92ee0a0 commit b73213f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/Folder.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions lib/metadataTypes/Folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,13 +647,15 @@ class Folder extends MetadataType {
* @returns {Promise.<ListMap>} Promise of saved metadata
*/
static async saveResults(results, retrieveDir) {
const mid = this.buObject.mid;
/** @type {ListMap} */
const savedResults = {};
for (const metadataEntry in results) {
try {
// skip saving shared folders as they technically live in parent.
if (results[metadataEntry].Client && mid != results[metadataEntry].Client.ID) {
if (
results[metadataEntry].Client &&
this.buObject.mid != results[metadataEntry].Client.ID
) {
// deploy: folders auto-generated by deploy do not have .Client set and hence this check will be skipped
// retrieve: Client.ID is set to the MID of the BU that the folder belongs to; we only want folders of the current BU saved here
continue;
Expand Down

0 comments on commit b73213f

Please sign in to comment.