Avoid overriding the mutable self.kwargs for LinkColumn Accessors. master
authorW. Trevor King <wking@drexel.edu>
Thu, 21 Jul 2011 12:39:57 +0000 (08:39 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 21 Jul 2011 12:39:57 +0000 (08:39 -0400)
django_tables2/columns.py

index c547fa7de1f70b9bff40175282348dd6dd38875e..12ccee12d100aa4a62cdde07b954f9239ca8ff90 100644 (file)
@@ -238,10 +238,12 @@ class LinkColumn(Column):
             params['args'] = [a.resolve(record) if isinstance(a, A) else a
                               for a in self.args]
         if self.kwargs:
-            params['kwargs'] = self.kwargs
+            params['kwargs'] = {}
             for key, value_ in self.kwargs.items():
                 if isinstance(value_, A):
                     params['kwargs'][key] = value_.resolve(record)
+                else:
+                    params['kwargs'][key] = value_
         if self.current_app:
             params['current_app'] = self.current_app
             for key, value in self.current_app: