[Zope] Acquisition not working as expected

Roman Klesel roman_plonemail at lotuseyes.de
Wed Mar 1 08:41:14 EST 2006


Hello Andrew,

Andrew Milton schrieb:
> Are you sure your genId() method works?
> 

Well, yes, it does what it's ment to do. It generates an id, a string.

Here it is:

	def genId(self,context):
		"asdf"
		items = [ int(e[2:]) for e in context.objectIds('Folder') ]
		if items == []:
			return 'lt100000'
		return 'lt%s' % str(max(items)+1

> what does return self.id return instead of self.getId() ?
> 

I just checked, there is no difference. Both return the id of the product instance as string.

Greetings Roman


More information about the Zope mailing list