Skip to content

Commit

Permalink
fix(core): incorrect topic type and status on loading
Browse files Browse the repository at this point in the history
  • Loading branch information
HoyosJuan committed Aug 24, 2024
1 parent d702cd7 commit cb961a9
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions packages/core/src/openbim/BCFTopics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,13 +588,26 @@ export class BCFTopics
const xml = await markupFile.async("string");
const markup = BCFTopics.xmlParser.parse(xml).Markup;
const markupTopic = markup.Topic;
const { Guid, Type, Status, Title, CreationDate, CreationAuthor } =
markupTopic;
const {
Guid,
TopicType,
TopicStatus,
Title,
CreationDate,
CreationAuthor,
} = markupTopic;

// Required Data
if (ignoreIncompleteTopicsOnImport) {
if (
!(Guid && Type && Status && Title && CreationDate && CreationAuthor)
!(
Guid &&
TopicType &&
TopicStatus &&
Title &&
CreationDate &&
CreationAuthor
)
)
continue;
}
Expand All @@ -603,8 +616,8 @@ export class BCFTopics
topic.guid = Guid ?? topic.guid;
const relatedTopics = this.getMarkupRelatedTopics(markup, version);
topicRelations[topic.guid] = new Set(relatedTopics);
topic.type = Type ?? topic.type;
topic.status = Status ?? topic.status;
topic.type = TopicType ?? topic.type;
topic.status = TopicStatus ?? topic.status;
topic.title = Title ?? topic.title;
topic.creationDate = CreationDate
? new Date(CreationDate)
Expand Down

0 comments on commit cb961a9

Please sign in to comment.