Chase the renaming of the areadirectors model to areadirector,

and thus the renaming of the auto-generated _set attribute.

Remove the areadirectors_set() function.
 - Legacy-Id: 555
This commit is contained in:
Bill Fenner 2007-06-20 14:02:32 +00:00
parent 0e1728e2ab
commit dc0832af51
2 changed files with 2 additions and 4 deletions

View file

@ -81,8 +81,6 @@ class Area(models.Model):
def active_area_choices():
return [(area.area_acronym_id, area.area_acronym.acronym) for area in Area.objects.filter(status=1).select_related().order_by('acronym.acronym')]
active_area_choices = staticmethod(active_area_choices)
def areadirectors_set(self):
return AreaDirector.objects.filter(area=self.area_acronym)
class Meta:
db_table = 'areas'
verbose_name="area"

View file

@ -97,7 +97,7 @@ class NonWgWizard(wizard.Wizard):
self.form_list.append(forms.form_for_instance(NonWgMailingList.objects.get(pk=form.clean_data['list_id']), formfield_callback=nonwg_callback))
elif form.clean_data['add_edit'] == 'delete':
list = NonWgMailingList.objects.get(pk=form.clean_data['list_id_delete'])
self.form_list.append(gen_approval([ad.person_id for ad in list.area.areadirectors_set()], DeletionPickApprover))
self.form_list.append(gen_approval([ad.person_id for ad in list.area.areadirector_set.all()], DeletionPickApprover))
self.form_list.append(Preview)
else:
self.clean_forms.append(form)
@ -105,7 +105,7 @@ class NonWgWizard(wizard.Wizard):
form0 = self.clean_forms[0]
add_edit = form0.clean_data['add_edit']
if add_edit == 'add' or add_edit == 'edit':
self.form_list.append(gen_approval([ad.person_id for ad in Area.objects.get(area_acronym=form.clean_data['area']).areadirectors_set()], PickApprover))
self.form_list.append(gen_approval([ad.person_id for ad in Area.objects.get(area_acronym=form.clean_data['area']).areadirector_set.all()], PickApprover))
self.form_list.append(Preview)
super(NonWgWizard, self).process_step(request, form, step)
def done(self, request, form_list):