def resource_list(self, value): if isinstance(value, list): self._resource_list = list() for i in value: if isinstance(i, ProdResource): self._resource_list.append(i) else: self._resource_list.append( ProdResource.from_alipay_dict(i))
def resources(self, value): if isinstance(value, ProdResource): self._resources = value else: self._resources = ProdResource.from_alipay_dict(value)