def serialize(self, field, cstruct, **kw): if cstruct in (null, None): cstruct = {} kw['url'] = None if 'uid' not in cstruct and 'id' in cstruct: cstruct['uid'] = cstruct['id'] if cstruct['id'] != null and self.get_url: kw['url'] = self.get_url(self.request, cstruct['id']) return DeformFileUploadWidget.serialize(self, field, cstruct, **kw)
def serialize(self, field, cstruct, **kw): if cstruct in (null, None): cstruct = {} kw['url'] = None if 'uid' not in cstruct and self.id_field in cstruct: cstruct['uid'] = cstruct[self.id_field] if cstruct[self.id_field] != null and self.get_url: kw['url'] = self.get_url(self.request, cstruct[self.id_field]) if cstruct.get('filename', None) == null: cstruct['filename'] = "" return DeformFileUploadWidget.serialize(self, field, cstruct, **kw)
def serialize(self, field, cstruct, **kw): if cstruct in (null, None): cstruct = {} if 'id' in cstruct: cstruct['uid'] = cstruct['id'] return DeformFileUploadWidget.serialize(self, field, cstruct, **kw)