Ran into a bug with (at least) ForeignKeys. Actually, the bug is when we access
an attribute of an FK object that is a null entry. (Clearly, we shouldn't be
doing this, but the bug is that it's not raising NotFound, but getting through
to the attribute).
groupName = category.artworkGroup.name
File "<string>", line 1, in <lambda>
File "/usr/lib/python2.2/site-packages/SQLObject/SQLObject.py", line 692, in
results = self._connection._SO_selectOne(self,
File "/usr/lib/python2.2/site-packages/SQLObject/DBConnection.py", line 254,
return self.queryOne("SELECT %s FROM %s WHERE %s = %s" %
AttributeError: 'ArtworkCategory' object has no attribute 'id'
this is when category.artworkGroupID is NULL.
I'll look into this further tomorrow. In my glancing today I couldn't determine
why instantiating the artworkGroup object doesn't blow up, which is the
expected behavior, but instead an object WITHOUT an id field is being created.
Edmund's report may be related to this however, which is why i bring it up...
For now, just starting a thread to talk to myself in...