File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -260,24 +260,25 @@ def _duplicate_onboarding_sandbox_document(self):
260260 try :
261261 template_document = Document .objects .get (id = sandbox_id )
262262
263- sandbox_document = template_document .add_sibling (
264- "right" ,
265- title = template_document .title ,
266- content = template_document .content ,
267- attachments = template_document .attachments ,
268- duplicated_from = template_document ,
269- creator = self ,
270- )
271-
272- DocumentAccess .objects .create (
273- user = self , document = sandbox_document , role = RoleChoices .OWNER
274- )
275-
276263 except Document .DoesNotExist :
277264 logger .warning (
278265 "Onboarding sandbox document with id %s does not exist. Skipping." ,
279266 sandbox_id ,
280267 )
268+ return
269+
270+ sandbox_document = template_document .add_sibling (
271+ "right" ,
272+ title = template_document .title ,
273+ content = template_document .content ,
274+ attachments = template_document .attachments ,
275+ duplicated_from = template_document ,
276+ creator = self ,
277+ )
278+
279+ DocumentAccess .objects .create (
280+ user = self , document = sandbox_document , role = RoleChoices .OWNER
281+ )
281282
282283 def _convert_valid_invitations (self ):
283284 """
You can’t perform that action at this time.
0 commit comments