Skip to content

Commit a2b0342

Browse files
committed
Removed the notion of an incumbent. Fixes ietf-tools#1771.
- Legacy-Id: 10522
1 parent 5bafd3d commit a2b0342

7 files changed

Lines changed: 4 additions & 14 deletions

File tree

ietf/nomcom/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class NomineePositionAdmin(admin.ModelAdmin):
2323

2424

2525
class PositionAdmin(admin.ModelAdmin):
26-
list_display = ('name', 'nomcom', 'is_open', 'incumbent')
26+
list_display = ('name', 'nomcom', 'is_open')
2727
list_filter = ('nomcom',)
2828

2929

ietf/nomcom/forms.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,14 +566,13 @@ class NomComTemplateForm(BaseNomcomForm, DBTemplateForm):
566566

567567
class PositionForm(BaseNomcomForm, forms.ModelForm):
568568

569-
fieldsets = [('Position', ('name', 'description',
570-
'is_open', 'incumbent'))]
569+
fieldsets = [('Position', ('name', 'description', 'is_open' ))]
571570

572571
incumbent = SearchableEmailField(required=False)
573572

574573
class Meta:
575574
model = Position
576-
fields = ('name', 'description', 'is_open', 'incumbent')
575+
fields = ('name', 'description', 'is_open')
577576

578577
def __init__(self, *args, **kwargs):
579578
self.nomcom = kwargs.pop('nomcom', None)

ietf/nomcom/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ class Position(models.Model):
163163
requirement = models.ForeignKey(DBTemplate, related_name='requirement', null=True, editable=False)
164164
questionnaire = models.ForeignKey(DBTemplate, related_name='questionnaire', null=True, editable=False)
165165
is_open = models.BooleanField(verbose_name='Is open', default=False)
166-
incumbent = models.ForeignKey(Email, null=True, blank=True)
167166

168167
objects = PositionManager()
169168

ietf/nomcom/resources.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ class Meta:
2525
}
2626
api.nomcom.register(NomComResource())
2727

28-
from ietf.person.resources import EmailResource
2928
from ietf.dbtemplate.resources import DBTemplateResource
3029
class PositionResource(ModelResource):
3130
nomcom = ToOneField(NomComResource, 'nomcom')
3231
requirement = ToOneField(DBTemplateResource, 'requirement', null=True)
3332
questionnaire = ToOneField(DBTemplateResource, 'questionnaire', null=True)
34-
incumbent = ToOneField(EmailResource, 'incumbent', null=True)
3533
class Meta:
3634
queryset = Position.objects.all()
3735
serializer = api.Serializer()
@@ -44,7 +42,6 @@ class Meta:
4442
"nomcom": ALL_WITH_RELATIONS,
4543
"requirement": ALL_WITH_RELATIONS,
4644
"questionnaire": ALL_WITH_RELATIONS,
47-
"incumbent": ALL_WITH_RELATIONS,
4845
}
4946
api.nomcom.register(PositionResource())
5047

ietf/nomcom/test_data.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ def nomcom_test_data():
131131
position, created = Position.objects.get_or_create(nomcom=nomcom,
132132
name=name,
133133
description=description,
134-
is_open=True,
135-
incumbent=email)
134+
is_open=True)
136135

137136
ChangeStateGroupEvent.objects.get_or_create(group=group,
138137
type="changed_state",

ietf/templates/nomcom/list_positions.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ <h3>{{ position.name }}</h3>
1818
<dl class="dl-horizontal">
1919
<dt>Description</dt>
2020
<dd>{{ position.description }}</dd>
21-
<dt>Incumbent</dt>
22-
<dd>{% if position.incumbent %}{{ position.incumbent.person }} &lt;{{ position.incumbent.address }}&gt;{% else %}None{% endif %}</dd>
2321
<dt>Is open</dt>
2422
<dd>{{ position.is_open }}</dd>
2523
<dt>Templates</dt>

ietf/templates/nomcom/remove_position.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ <h2>Position: {{ position }}</h2>
1010
<dl>
1111
<dt>Description:</dt>
1212
<dd>{{ position.description }}</dd>
13-
<dt>Incumbent:</dt>
14-
<dd>{{ position.incumbent }}</dd>
1513
<dt>Is open:</dt>
1614
<dd>{{ position.is_open }}</dd>
1715
</dl>

0 commit comments

Comments
 (0)