@must_have_permission(ADMIN)
@must_be_valid_project
def get_draft_registrations(auth, node, *args, **kwargs):
 count = request.args.get('count', 100)
 drafts = itertools.islice(node.draft_registrations_active, 0, count)
 serialized_drafts = [serialize_draft_registration(d, auth) for d in drafts]
 sorted_serialized_drafts = sorted(serialized_drafts, key=itemgetter('updated'), reverse=True)
 return ({'drafts': sorted_serialized_drafts}, http.OK)

@ must_have_permission ( ADMIN ) @ must_be_valid_project def get_draft_registrations ( auth , node , * args , ** kwargs ) : count = request . args . get ( 'count' , 100 ) drafts = itertools . islice ( node . draft_registrations_active , 0 , count ) serialized_drafts = [ serialize_draft_registration ( d , auth ) for d in drafts ] sorted_serialized_drafts = sorted ( serialized_drafts , key = itemgetter ( 'updated' ) , reverse = True ) return ( { 'drafts' : sorted_serialized_drafts } , http . OK )
list draft registrations for a node :return: serialized draft registrations :rtype: dict .