def get_record(uid=None):
obj = None<EOL>if uid is not None:<EOL><INDENT>obj = get_object_by_uid(uid)<EOL><DEDENT>else:<EOL><INDENT>obj = get_object_by_request()<EOL><DEDENT>if obj is None:<EOL><INDENT>fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>complete = req.get_complete(default=_marker)<EOL>if complete is _marker:<EOL><INDENT>complete = True<EOL><DEDENT>items = make_items_for([obj], complete=complete)<EOL>return u.first(items)<EOL>
Get a single record