diff --git a/mpicms/personal/models.py b/mpicms/personal/models.py index 5866f93..93aee8a 100644 --- a/mpicms/personal/models.py +++ b/mpicms/personal/models.py @@ -74,13 +74,9 @@ class Meta: @register_snippet class Group(index.Indexed, models.Model): name = models.CharField(_("name"), max_length=254, blank=True) - priority = models.PositiveSmallIntegerField( - _("priority"), blank=True, default=0, validators=[MaxValueValidator(99)], - help_text=_("Priority from 0-99 to determine the sorting order.")) panels = [ FieldPanel('name'), - FieldPanel('priority'), ] search_fields = [ @@ -106,9 +102,6 @@ class Contact(index.Indexed, models.Model): phone = models.CharField(_("phone number"), blank=True, max_length=50) room = models.CharField(_("room"), max_length=50, blank=True) is_active = models.BooleanField(_("is active"), default=True) - priority = models.PositiveSmallIntegerField( - _("priority"), blank=True, default=0, validators=[MaxValueValidator(999)], - help_text=_("Priority from 0-999 to determine the sorting order.")) status = models.ForeignKey(Status, on_delete=models.SET_NULL, blank=True, null=True) special_functions = models.ManyToManyField(SpecialFunction, verbose_name=_('special functions'), blank=True) positions = models.ManyToManyField(Position, related_name="contacts", blank=True, verbose_name=_('positions')) @@ -131,7 +124,6 @@ class Contact(index.Indexed, models.Model): FieldPanel('phone'), FieldPanel('room'), FieldPanel('is_active'), - FieldPanel('priority'), ] search_fields = [ @@ -157,7 +149,6 @@ def __str__(self): class Meta: # noqa verbose_name = 'Contact' verbose_name_plural = 'Contacts' - # ordering = ['groups__group', '-priority', 'last_name'] ordering = ['last_name']