fix processing user defined choices in job templates
authorMaciej Tronowski <mtro@man.poznan.pl>
Thu, 2 Jul 2015 11:57:45 +0000 (13:57 +0200)
committerMaciej Tronowski <mtro@man.poznan.pl>
Thu, 2 Jul 2015 11:57:45 +0000 (13:57 +0200)
qcg/forms.py

index abb5b57..5e93416 100644 (file)
@@ -237,7 +237,7 @@ class JobDescriptionForm(forms.Form):
 
     def _init_user_choices(self, name, data, initial):
         initial = initial.get(name) if initial is not None else None
-        choices = data.getlist(name) if data is not None else []
+        choices = data.getlist(name)[:] if data is not None else []
 
         if initial:
             choices += initial if isinstance(initial, list) else [initial]