Login | Register
My pages Projects Community openCollabNet

Discussions > dev > PATCH: unneeded NULL insert

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

Back to topic list

PATCH: unneeded NULL insert

Reply

Author jaredgreenwald
Full name Jared Greenwald
Date 2006-09-21 19:14:59 PDT
Message -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There doesn't seem to be much reason to be inserting a NULL into an
auto_increment field...

- -Jared

# diff -ruN /usr/src/redhat/BUIL​D/current-1.7.5/curr​ent/db/profile.py
/usr/lib/python2.3/s​ite-packages/current​/db/profile.py
- --- /usr/src/redhat/BUIL​D/current-1.7.5/curr​ent/db/profile.py
2006-09-13 11:24:20.000000000 -0700
+++ /usr/lib/python2.3/s​ite-packages/current​/db/profile.py
2006-09-21 19:09:10.000000000 -0700
@@ -41,9 +41,9 @@
         self.cursor = db.sdb.getCursor()

     def addProfile(self, user, arch, os_release, name, release_name, uuid):
- - q = """insert into PROFILE (profile_id, user_id, architecture,
+ q = """insert into PROFILE (user_id, architecture,
                cannon_arch, os_release, name, release_name, uuid)
- - values (NULL, %s, %s, %s, %s, %s, %s, %s)"""
+ values (%s, %s, %s, %s, %s, %s, %s)"""

         t = (user, arch, getCannonArch(arch), os_release,
              name, release_name, uuid)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFE0cju4z7Xptg​TUYRApTKAJ41xFHSDGRm​F+wjU4fDI86Q/rcQqACg​ulSc
W6d7NBHqT8HDLxCJN9CwgaE=
=ivGX
-----END PGP SIGNATURE-----

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

PATCH: unneeded NULL insert jaredgreenwald Jared Greenwald 2006-09-21 19:14:59 PDT
Messages per page: