Finishing Grafoscopio notebooks importation with fix for original creation/modification nil data in nodes.
This commit is contained in:
parent
a84ead51e1
commit
9361094bf6
@ -195,7 +195,7 @@ LeDatabase >> sanitizeMarkdeepSnippets: divSnippets withMetadata: remoteMetadata
|
|||||||
snippetData := markdeepDiv asSnippetDictionary.
|
snippetData := markdeepDiv asSnippetDictionary.
|
||||||
creationTime := snippetData at: 'created'.
|
creationTime := snippetData at: 'created'.
|
||||||
modificationTime := snippetData at: 'modified'.
|
modificationTime := snippetData at: 'modified'.
|
||||||
timestampWarning := [:timestamp | 'Modified timestamps: ', timestamp ,' date and time was replaced instead of nil value. See "origin" key for more traceability info.'].
|
timestampWarning := [:timestamp | 'Modified timestamps: ', timestamp ,' date and time was replaced instead of nil value. See "origin" metadata for more historical traceability information.'].
|
||||||
(creationTime = 'nil' and: [ modificationTime ~= 'nil' ])
|
(creationTime = 'nil' and: [ modificationTime ~= 'nil' ])
|
||||||
ifTrue: [
|
ifTrue: [
|
||||||
snippetData redefineTimestampsBefore: modificationTime.
|
snippetData redefineTimestampsBefore: modificationTime.
|
||||||
|
@ -74,7 +74,11 @@ LeTextualSnippet >> metadataInit [
|
|||||||
| surrogate |
|
| surrogate |
|
||||||
self parent
|
self parent
|
||||||
ifNil: [ surrogate := nil]
|
ifNil: [ surrogate := nil]
|
||||||
ifNotNil: [ surrogate := self parent uidString ].
|
ifNotNil: [
|
||||||
|
self parent isString
|
||||||
|
ifTrue: [ surrogate := self parent]
|
||||||
|
ifFalse: [ surrogate := self parent uidString ]
|
||||||
|
].
|
||||||
^ OrderedDictionary new
|
^ OrderedDictionary new
|
||||||
at: 'id' put: self uidString;
|
at: 'id' put: self uidString;
|
||||||
at: 'parent' put: surrogate;
|
at: 'parent' put: surrogate;
|
||||||
|
@ -26,6 +26,8 @@ OrderedDictionary >> asLepiterSnippet [
|
|||||||
editTime: (LeTime new time: ((self at: 'modified') asDateAndTime));
|
editTime: (LeTime new time: ((self at: 'modified') asDateAndTime));
|
||||||
editEmail: (self at: 'modifier');
|
editEmail: (self at: 'modifier');
|
||||||
createEmail: (self at: 'creator').
|
createEmail: (self at: 'creator').
|
||||||
|
response metadata at: 'origin' ifPresent: [ response metadata at: 'origin' put: (self at: 'origin') ].
|
||||||
|
response metadata at: 'errata' ifPresent: [ response metadata at: 'errata' put: (self at: 'errata') ].
|
||||||
^ response
|
^ response
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user