#261 cannot delete objects when many-to-many still none

Postgres (36)

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


  • Oleg Broytman

    Oleg Broytman - 2010-06-18

    Can you write a short script to demonstrate the problem? I will turn it into a test case. Thanks in advance.

  • Oleg Broytman

    Oleg Broytman - 2010-06-18
    • assigned_to: nobody --> phd

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks