fix: Remove Person.core_member field

See #33
This commit is contained in:
James Graham
2020-06-24 13:47:12 +01:00
parent 9a84f77ec4
commit 26bf55b4b4
4 changed files with 30 additions and 16 deletions

View File

@@ -22,7 +22,6 @@ class PersonSerializer(base.FlattenedModelSerializer):
fields = [
'id',
'name',
'core_member',
'gender',
'age_group',
'nationality',
@@ -71,7 +70,9 @@ class RelationshipAnswerSetSerializer(base.FlattenedModelSerializer):
try:
# Add relationship question answers to data
for answer in instance.question_answers.all():
rep[answer.question.slug.replace('-', '_')] = answer.slug.replace('-', '_')
rep[answer.question.slug.replace('-',
'_')] = answer.slug.replace(
'-', '_')
except AttributeError:
pass

View File

@@ -16,7 +16,6 @@ class PersonForm(forms.ModelForm):
model = models.Person
fields = [
'name',
'core_member',
'gender',
'age_group',
'nationality',

View File

@@ -0,0 +1,17 @@
# Generated by Django 2.2.10 on 2020-06-24 11:14
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('people', '0018_require_user_email'),
]
operations = [
migrations.RemoveField(
model_name='person',
name='core_member',
),
]

View File

@@ -122,9 +122,6 @@ class Person(models.Model):
#: Name of the person
name = models.CharField(max_length=255, blank=False, null=False)
#: Is this person a member of the core project team?
core_member = models.BooleanField(default=False, blank=False, null=False)
#: People with whom this person has relationship - via intermediate :class:`Relationship` model
relationship_targets = models.ManyToManyField(
'self',