1. Andrew Davison
  2. sumatra

Commits

Andrew Davison  committed f510395

Fixed #176

  • Participants
  • Parent commits 776fbe9
  • Branches default

Comments (0)

Files changed (2)

File sumatra/web/services.py

View file
     class Meta:
         model = models.Record
         fields = ('reason', 'outcome', 'tags')
+
+
+class TagUpdateForm(forms.ModelForm):
+    class Meta:
+        model = models.Record
+        fields = ('tags',)

File sumatra/web/views.py

View file
     from django.views.generic.dates import MonthArchiveView
 except ImportError:  # older versions of Django
     MonthArchiveView = object
-from services import DefaultTemplate, AjaxTemplate, ProjectUpdateForm, RecordUpdateForm, unescape
+from services import DefaultTemplate, AjaxTemplate, ProjectUpdateForm, RecordUpdateForm, TagUpdateForm, unescape
 from sumatra.recordstore.django_store.models import Project, Tag, Record
 from sumatra.datastore import get_data_store, DataKey
 from sumatra.versioncontrol import get_working_copy
         records_to_settags = records_to_settags.split(',')
         records = Record.objects.filter(label__in=records_to_settags, project__id=project)
         for record in records:
-            form = RecordUpdateForm(request.POST, instance=record)
+            form = TagUpdateForm(request.POST, instance=record)
             if form.is_valid():
                 form.save()
         return HttpResponseRedirect('.')