On Fri, Jul 18, 2008 at 04:56:55PM +0100, nnp wrote:
> I'm not sure why but sometimes when I attempt to run the following
> line of code I get an error saying 'AttributeError: FileAction
> instance has no attribute 'file''
> 
> Is there any obvious reason why this would happen? I can't see any
> obvious reason from the docs as to why that would happen sometimes but
> not others.
> 
> deleteFileAction = list(FileAction.select(AND(FileAction.q.file ==
> codeBug.file, FileAction.q.action == deleteAction)))
> 
> class FileAction(SQLObject):
>     file = ForeignKey('File', notNull=True)
>     commitLog = ForeignKey('CommitLog')
>     action = ForeignKey('Action')

   In older versions of SQLObject it was spelled fileID:

deleteFileAction = list(FileAction.select(AND(FileAction.q.fileID ==
codeBug.file, FileAction.q.action == deleteAction)))

   Upgrade to SQLObject 0.10 and the magic will go away.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to