def _update_request_parent_field_type():
    """Change GenericReferenceField to ReferenceField"""
    from bg_utils.mongo.models import Request
    raw_collection = Request._get_collection()
    for request in raw_collection.find({'parent._ref': {'$type': 'object'}}):
        raw_collection.update_one({'_id': request['_id']}, {'$set': {
            'parent': request['parent']['_ref']}})
