We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
无法直接通过 __init__ 方法还原一个 dump 出来的数据,所以自己做了一个:
__init__
class Object: @classmethod def load(cls, attrs): obj, meta_date = cls(), dict() for k in ("createdAt", "updatedAt"): v = attrs.pop(k, None) if v is not None: meta_date[k] = v obj._attributes[k] = utils.decode(k, v) obj._merge_metadata(meta_date) # 此处不能直接 obj.set(attrs),否则 Pointer 类型会被当做字典设置到字段上 for k, v in attrs.items(): obj.set(k, v) return obj
无法直接通过
__init__方法还原一个 dump 出来的数据,所以自己做了一个: