Re: Zwei ArrayField Fragen: Feldzugriff und Fehler bei ImageField

Raphael Ritz <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Nico Grubert wrote:
[..]

>>
>> Exception Type      TypeError
>> Exception Value     getContentType() takes exactly 1 argument (2 given)
> 
> Ich antworte mal selbst, da ich zwar weiss, wie ich den Fehler umgehe, 
> aber die eigentliche Ursache habe ich nicht herausgefunden.
> 
> In Products.Archetypes.BaseObject.py Zeile 318 steht in getContentType() 
> folgender Code:
> 
> if field and shasattr(field, 'getContentType'):
>     return field.getContentType(self)
> 
> Wenn ich aus dieser Zeile
> 
>   try: return field.getContentType(self)
>   except: return field.getContentType()
> 
> mache, klappt alles wunderbar. Ich weiss leider nicht, ob das ein Bug 
> ist, oder ob ich etwas übersehen habe.

Funktionieren normale Text- und Filefelder dann noch?

Wenn mich nicht alles täuscht, brauchen die das.

Definiert denn das ArrayField eine eigene 'getContentType'
Methode mit incompatibler Signatur? Wenn ja, wuerde ich
die patchen.

Raphael




> 
> Gruss
> Nico
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.