示例#1
0
def content_unit_obj(content_unit):
    """
    Serialize a content unit.
    """
    serial = db.scrub_mongo_fields(content_unit)
    last_updated = content_unit.get('_last_updated')
    if last_updated:
        content_unit['_last_updated'] = dateutils.format_iso8601_utc_timestamp(last_updated)
    return serial
示例#2
0
文件: content.py 项目: pombreda/pulp
def content_unit_obj(content_unit):
    """
    Serialize a content unit.
    """
    serial = db.scrub_mongo_fields(content_unit)
    last_updated = content_unit.get('_last_updated')
    if last_updated:
        content_unit['_last_updated'] = dateutils.format_iso8601_utc_timestamp(
            last_updated)
    return serial
示例#3
0
文件: content.py 项目: pombreda/pulp
def content_type_obj(content_type):
    """
    Serialize a content type.
    """
    serial = db.scrub_mongo_fields(content_type)
    return serial
示例#4
0
def content_type_obj(content_type):
    """
    Serialize a content type.
    """
    serial = db.scrub_mongo_fields(content_type)
    return serial