Handling error for uid duplication.

This commit is contained in:
ruidajo 2025-03-22 13:13:23 -05:00
parent b74ac124f3
commit 31efcd11b2

View File

@ -391,8 +391,13 @@ LePage >> uiSync: anAction [
^ anAction button ^ anAction button
tooltip: 'Sync with remote document'; tooltip: 'Sync with remote document';
icon: BrGlamorousVectorIcons refresh; icon: BrGlamorousVectorIcons refresh;
action: [ "Exeption LeDuplicatePageIdError"self database action: [ "Exeption LeDuplicatePageIdError"[ self database
importDocumentFrom: self remote ] importDocumentFrom: self remote ]
onErrorDo: [ :err |
self
assignNewUID;
updateTitle: self title , '-old'.
self database importDocumentFrom: self remote ] ]
] ]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }