Handling error for uid duplication.
This commit is contained in:
parent
b74ac124f3
commit
31efcd11b2
@ -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' }
|
||||||
|
Loading…
Reference in New Issue
Block a user