Bugs item #3009526, was opened at 2010-05-31 15:45
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3009526&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Postgres
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://me.yahoo.com/a/3iW2HuMk ()
Assigned to: Nobody/Anonymous (nobody)
Summary: cannot delete objects when many-to-many still none
Initial Comment:
I have objects with many-to-many relationships. However it may happen that none of these relationships was set, when I want to delete one of the objects. Python returns the following error:
psycopg2.ProgrammingError: relation "none" does not exist
I fixed it by inserting:
if join.intermediateTable:
In function destroySelf() before starting the SQL query to delete the entry in the intermediate table. Which apparently is not created if no many-to-many relationship have been set. Another approach would be to make sure that an intermediate table exists even when there are still no entries defined. This would probably be more secure if other functions also assume that this table already exists.
SQLObject version 12.3, Python 2.6, Postgres 8.4
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=3009526&group_id=74338
|