Commits

John Costa  committed 9e93302

force update

  • Participants
  • Parent commits 832f07b

Comments (0)

Files changed (2)

File feature_request/forms.py

                    'status', 'decline_type', 'decline_comments',
                     'active')
         
-    def save(self, request, member, submit=False):
+    def save(self, request, member, submit=False, id=None):
         feature_request=super(FeatureRequestForm, self).save(commit=False)
+        feature_request.id=id
         feature_request.member = member
         feature_request.save(force_update=True)
         messages.add_message(request, messages.ERROR, 'Feature request "%s" has been saved.' % feature_request.request_title)

File feature_request/views.py

     if request.method == 'POST':
         form = FeatureRequestForm(request.POST)
         if form.is_valid():
-            form.save(request, user)
+            form.save(request, user, id=feature_id)
         return HttpResponseRedirect(reverse('feature_request_home'))
 
     form = FeatureRequestForm(model_to_dict(feature_request))
     if request.method == 'POST':
         form = FeatureRequestForm(request.POST)
         if form.is_valid():
+
             form.save(request, user)
             return HttpResponseRedirect(reverse('feature_request_home'))
     else :