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:
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