diff --git a/RIGS/migrations/0042_auto_20210302_1121.py b/RIGS/migrations/0042_auto_20210302_1121.py new file mode 100644 index 00000000..08f8729a --- /dev/null +++ b/RIGS/migrations/0042_auto_20210302_1121.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.7 on 2021-03-02 11:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('RIGS', '0041_auto_20210208_1603'), + ] + + operations = [ + migrations.AlterField( + model_name='profile', + name='phone', + field=models.CharField(blank=True, default='', max_length=13), + ), + ] diff --git a/RIGS/models.py b/RIGS/models.py index 6cb3133e..135a42fa 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -21,7 +21,7 @@ from reversion.models import Version class Profile(AbstractUser): initials = models.CharField(max_length=5, unique=True, null=True, blank=False) - phone = models.CharField(max_length=13, null=True, default='') + phone = models.CharField(max_length=13, blank=True, default='') api_key = models.CharField(max_length=40, blank=True, editable=False, default='') is_approved = models.BooleanField(default=False) # Currently only populated by the admin approval email. TODO: Populate it each time we send any email, might need that... @@ -792,16 +792,16 @@ class EventChecklist(models.Model, RevisionMixin): inverted_fields = [] - @cached_property - def fields(self): - return [n.name for n in list(self._meta.get_fields()) if n.name != 'reviewed_at' and n.name != 'reviewed_by' and not n.is_relation and not n.auto_created] - class Meta: ordering = ['event'] permissions = [ ('review_eventchecklist', 'Can review Event Checklists') ] + @cached_property + def fields(self): + return [n.name for n in list(self._meta.get_fields()) if n.name != 'reviewed_at' and n.name != 'reviewed_by' and not n.is_relation and not n.auto_created] + @property def activity_feed_string(self): return str(self.event) diff --git a/RIGS/templates/hs_object_list.html b/RIGS/templates/hs_object_list.html index 8849b168..c9029a02 100644 --- a/RIGS/templates/hs_object_list.html +++ b/RIGS/templates/hs_object_list.html @@ -21,7 +21,7 @@