Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/refactor export service (#5276)

Thomas Kaul32e0e60fb24a
diff --git a/apps/api/src/app/export/export.service.ts b/apps/api/src/app/export/export.service.ts
index 09168b505a..7d78bdf225 100644
--- a/apps/api/src/app/export/export.service.ts
+++ b/apps/api/src/app/export/export.service.ts
@@ -141,15 +141,16 @@ export class ExportService {
);
const tags = (await this.tagService.getTagsForUser(userId))
- .filter(
- ({ id, isUsed }) =>
+ .filter(({ id, isUsed }) => {
+ return (
isUsed &&
activities.some((activity) => {
return activity.tags.some(({ id: tagId }) => {
return tagId === id;
});
})
- )
+ );
+ })
.map(({ id, name }) => {
return {
id,