Fixing id detection for snippets in database importer markdeep page.

This commit is contained in:
ruidajo 2022-10-07 14:13:28 -05:00
parent 70a027ac1b
commit dd63f2f23e

View File

@ -23,7 +23,12 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
createEmail: (LeEmail new email:(remoteMetadata at: 'creator'));
editEmail: (LeEmail new email:(remoteMetadata at: 'modifier')).
snippets do: [ :snippet | page addSnippet: snippet ].
page children collect: [ :snippet | snippet database: self. self registerSnippet: snippet ].
page children collect: [ :snippet |
(self hasBlockUID: (snippet uid))
ifTrue: [ ^ snippet page ]
ifFalse: [
snippet database: self.
self registerSnippet: snippet ] ].
self addPage: page.
^ page
]