diff --git a/app/migrations/0011_auto_20211119_0354.py b/app/migrations/0011_auto_20211119_0354.py new file mode 100644 index 0000000..4d5af07 --- /dev/null +++ b/app/migrations/0011_auto_20211119_0354.py @@ -0,0 +1,28 @@ +# Generated by Django 3.2.5 on 2021-11-19 03:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0010_auto_20211119_0201'), + ] + + operations = [ + migrations.AlterField( + model_name='person', + name='news_letter', + field=models.BooleanField(default=False), + ), + migrations.AlterField( + model_name='person', + name='profile_on_web', + field=models.BooleanField(default=False), + ), + migrations.AlterField( + model_name='person', + name='updated', + field=models.BooleanField(default=False), + ), + ] diff --git a/app/models.py b/app/models.py index 94c903f..512d702 100644 --- a/app/models.py +++ b/app/models.py @@ -499,7 +499,7 @@ class Person(models.Model): status = models.TextField(blank=True, null=True) entry_date = models.TextField(blank=True, null=True) gmba_function = models.TextField(blank=True, null=True) - news_letter = models.TextField(blank=True, null=True) + news_letter = models.BooleanField(default=False) country_lookup = models.TextField(blank=True, null=True) organization = models.ForeignKey(Organization, models.DO_NOTHING, blank=True, null=True) birds = models.BooleanField(default=False) @@ -537,8 +537,8 @@ class Person(models.Model): national = models.BooleanField(default=False) _global = models.BooleanField(default=False) geographic_area_of_expertise = models.TextField(blank=True, null=True) - profile_on_web = models.TextField(blank=True, null=True) - updated = models.TextField(blank=True, null=True) + profile_on_web = models.BooleanField(default=False) + updated = models.BooleanField(default=False) orcid = models.TextField(blank=True, null=True) web_of_science = models.TextField(blank=True, null=True) twitter = models.TextField(blank=True, null=True) @@ -547,6 +547,9 @@ class Person(models.Model): class Meta: db_table = 'person' + def get_regional(self): + return False + def index(self): self.field_indexer = " ".join([ self.first_name, self.last_name, self.organisation, self.position, self.biography