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 23, 2024
1 parent e844ec8 commit 2666517
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/core/config/migrate-add-entity-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { EntityConfig } from "../entity/entity-config";
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 2666517

Please sign in to comment.