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.
|
||||
creationTime := snippetData at: 'created'.
|
||||
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' ])
|
||||
ifTrue: [
|
||||
snippetData redefineTimestampsBefore: modificationTime.
|
||||
|
@ -74,7 +74,11 @@ LeTextualSnippet >> metadataInit [
|
||||
| surrogate |
|
||||
self parent
|
||||
ifNil: [ surrogate := nil]
|
||||
ifNotNil: [ surrogate := self parent uidString ].
|
||||
ifNotNil: [
|
||||
self parent isString
|
||||
ifTrue: [ surrogate := self parent]
|
||||
ifFalse: [ surrogate := self parent uidString ]
|
||||
].
|
||||
^ OrderedDictionary new
|
||||
at: 'id' put: self uidString;
|
||||
at: 'parent' put: surrogate;
|
||||
|
@ -26,6 +26,8 @@ OrderedDictionary >> asLepiterSnippet [
|
||||
editTime: (LeTime new time: ((self at: 'modified') asDateAndTime));
|
||||
editEmail: (self at: 'modifier');
|
||||
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
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user