Beispiel #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
Beispiel #2
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
Beispiel #3
0
def content_type_obj(content_type):
    """
    Serialize a content type.
    """
    serial = db.scrub_mongo_fields(content_type)
    return serial
Beispiel #4
0
def content_type_obj(content_type):
    """
    Serialize a content type.
    """
    serial = db.scrub_mongo_fields(content_type)
    return serial