dabo Commit
Revision 3179
Date: 2007-06-14 18:37:08 -0700 (Thu, 14 Jun 2007)
Author: Johnf
Trac: http://svn.dabodev.com/trac/dabo/changeset/3179

Changed:
U   trunk/dabo/db/dbPostgreSQL.py

Log:
Changed the if test to insure negative numbers and zero are allowed for PK's

Diff:
Modified: trunk/dabo/db/dbPostgreSQL.py
===================================================================
--- trunk/dabo/db/dbPostgreSQL.py       2007-06-14 20:57:37 UTC (rev 3178)
+++ trunk/dabo/db/dbPostgreSQL.py       2007-06-15 01:37:08 UTC (rev 3179)
@@ -263,7 +263,7 @@
                sqlWithseq_name="""select currval('%s') as curval""" % 
(rs[0][0],)
                tempCursor.execute(sqlWithseq_name) 
                rs = tempCursor.fetchall()
-               if rs[0][0]:
+               if not rs[0][0] is None:
                        return rs[0][0]
                else:
                        raise AttributeError, "Unable to determine the sequence 
used or the sequence return a strange value."




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to