Skip to content

Commit e78d0ec

Browse files
author
Richard Jones
committed
oops
1 parent 73c28cb commit e78d0ec

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

roundup/cgi_client.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.58 2001-11-21 03:11:28 richard Exp $
18+
# $Id: cgi_client.py,v 1.59 2001-11-21 03:21:13 richard Exp $
1919

2020
import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
2121
import binascii, Cookie, time
@@ -961,12 +961,13 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
961961
props[key] = value
962962

963963
# get the old value
964-
try:
965-
existing = cl.get(nodeid, key)
966-
except KeyError:
967-
# this might be a new property for which there is no existing
968-
# value
969-
if not cl.properties.has_key(key): raise
964+
if nodeid:
965+
try:
966+
existing = cl.get(nodeid, key)
967+
except KeyError:
968+
# this might be a new property for which there is no existing
969+
# value
970+
if not cl.properties.has_key(key): raise
970971

971972
# if changed, set it
972973
if nodeid and value != existing:
@@ -976,6 +977,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
976977

977978
#
978979
# $Log: not supported by cvs2svn $
980+
# Revision 1.58 2001/11/21 03:11:28 richard
981+
# Better handling of new properties.
982+
#
979983
# Revision 1.57 2001/11/15 10:24:27 richard
980984
# handle the case where there is no file attached
981985
#

0 commit comments

Comments
 (0)