def get_by_id(cls, id): dbpost = id and DBPost.get_by_id(id) return dbpost and cls(dbpost)
def get_by_id(cls, id): dbpost = DBPost.get_by_id(id) return dbpost and cls(dbpost)