Store a copy of selection if possible for issue810

This commit is contained in:
Cédric Krier committed 2009-02-25 12:41:20 +01:00
1 parent a4b9258b71
commit bd9df98fe7
1 file changed
+4 -1
+4 -1
View File
@@ -9,6 +9,9 @@ class Selection(Field):
def __init__(self, selection, string='', sort=True, translate=True, **args):
super(Selection, self).__init__(string=string, **args)
self.selection = selection
if hasattr(selection, 'copy'):
self.selection = selection.copy()
else:
self.selection = selection
self.sort = sort
self.translate_selection = translate