diff roundup/backends/back_metakit.py @ 1385:2bd4822f96a6

- more fixes to CGI form handling - switch metakit to use "compressed" multilink journal change representation
author Richard Jones <richard@users.sourceforge.net>
date Wed, 15 Jan 2003 22:39:07 +0000
parents d1bfb479e527
children 7f9bd5b1e798
line wrap: on
line diff
--- a/roundup/backends/back_metakit.py	Wed Jan 15 22:17:20 2003 +0000
+++ b/roundup/backends/back_metakit.py	Wed Jan 15 22:39:07 2003 +0000
@@ -475,7 +475,8 @@
                         if self.do_journal and prop.do_journal:
                             self.db.addjournal(link_class, id, _LINK,
                                 (self.classname, str(row.id), key))
-                            
+
+                # perform the modifications on the actual property value
                 sv = getattr(row, key)
                 i = 0
                 while i < len(sv):
@@ -485,7 +486,17 @@
                         i += 1
                 for id in adds:
                     sv.append(fid=int(id))
-                changes[key] = oldvalue
+
+                # figure the journal entry
+                l = []
+                if adds:
+                    l.append(('+', adds))
+                if rmvd:
+                    l.append(('-', rmvd))
+                if l:
+                    changes[key] = tuple(l)
+                #changes[key] = oldvalue
+
                 if not rmvd and not adds:
                     del propvalues[key]
                     

Roundup Issue Tracker: http://roundup-tracker.org/