Skip to content

Commit

Permalink
fix: ensure base types like Note are migrated
Browse files Browse the repository at this point in the history
  • Loading branch information
sleidig committed Oct 22, 2024
1 parent e7600d7 commit 05e83fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/core/config/migrate-add-entity-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RecurringActivity } from "../../child-dev-project/attendance/model/recu
export function migrateAddMissingEntityAttributes(config: Config): Config {
for (let entityType of Object.keys(DEFAULT_ENTITIES)) {
// TODO: just blindly save all hard-coded fields into the entity config? or scan which ones are actually used?!
if (!JSON.stringify(config).includes(`"${entityType}"`)) {
if (!JSON.stringify(config).includes(`"${entityType}"`) || ["Note", "User"].includes(entityType)) {
// don't add config if the entity is never explicitly used or referenced
continue;
}
Expand Down

0 comments on commit 05e83fa

Please sign in to comment.