@must_have_permission(WRITE)
@must_not_be_registration
def fork_pointer(auth, node, **kwargs):
 NodeRelation = apps.get_model('osf.NodeRelation')
 pointer_id = request.json.get('pointerId')
 pointer = NodeRelation.load(pointer_id)
 if (pointer is None):
  raise HTTPError(http.BAD_REQUEST)
 try:
  node.fork_pointer(pointer, auth=auth, save=True)
 except ValueError:
  raise HTTPError(http.BAD_REQUEST)

@ must_have_permission ( WRITE ) @ must_not_be_registration def fork_pointer ( auth , node , ** kwargs ) : NodeRelation = apps . get_model ( 'osf.NodeRelation' ) pointer_id = request . json . get ( 'pointerId' ) pointer = NodeRelation . load ( pointer_id ) if ( pointer is None ) : raise HTTPError ( http . BAD_REQUEST ) try : node . fork_pointer ( pointer , auth = auth , save = True ) except ValueError : raise HTTPError ( http . BAD_REQUEST )
fork a pointer .