summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70a28d7)
raw | patch | inline | side by side (parent: 70a28d7)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 19 Mar 2003 02:50:40 +0000 (02:50 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 19 Mar 2003 02:50:40 +0000 (02:50 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1606 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/cgi/client.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 9c53e0208333a6b7e2efd7583a7318466b631955..f8baa3ad9c0ccde8c9b053f0e5b9e1c6ba7e145e 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- fixed export/import of retired nodes (sf bug 685273)
- remember the display template specified during edit (sf bug 701815)
- added example HTML tempating for vacation flag (sf bug 701722)
+- only look for CSV files when importing (thanks Dan Grassi)
+- can now unset values in CSV editing (sf bug 704788)
2003-??-?? 0.5.7
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index aa6d0868116afcf98f91e4ff69b6c3e6c2ca297f..a96babfd7e6ccb7af54ad7c4fa2a69d5b1ae18f5 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.107 2003-03-18 00:24:35 richard Exp $
+# $Id: client.py,v 1.108 2003-03-19 02:50:40 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
nodeid, values = values[0], values[1:]
found[nodeid] = 1
+ # see if the node exists
+ if cl.hasnode(nodeid):
+ exists = 1
+ else:
+ exists = 0
+
# confirm correct weight
if len(idlessprops) != len(values):
self.error_message.append(
# extract the new values
d = {}
for name, value in zip(idlessprops, values):
+ prop = cl.properties[name]
value = value.strip()
# only add the property if it has a value
if value:
# if it's a multilink, split it
- if isinstance(cl.properties[name], hyperdb.Multilink):
+ if isinstance(prop, hyperdb.Multilink):
value = value.split(':')
d[name] = value
+ elif exists:
+ # nuke the existing value
+ if isinstance(prop, hyperdb.Multilink):
+ d[name] = []
+ else:
+ d[name] = None
# perform the edit
- if cl.hasnode(nodeid):
+ if exists:
# edit existing
cl.set(nodeid, **d)
else: