Pass-in the initial value when performing a POST on Workflow Action. This fixes the call to self.changed_data, it allows django forms to be able to compare initial value with current value.

Fixes bug 1153697.

Change-Id: I21846487ada34f3b007a545bcdcba400bd044af5
This commit is contained in:
Lin Hua Cheng 2013-03-12 09:17:37 -07:00
parent d5d71881cf
commit 80f5126790

View File

@ -129,7 +129,7 @@ class Action(forms.Form):
def __init__(self, request, context, *args, **kwargs):
if request.method == "POST":
super(Action, self).__init__(request.POST)
super(Action, self).__init__(request.POST, initial=context)
else:
super(Action, self).__init__(initial=context)