Skip to content

Commit

Permalink
personal: Remove fireld priority from Grouo and Contact
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Feb 9, 2025
1 parent d775eb6 commit cd95250
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions mpicms/personal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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'))
Expand All @@ -131,7 +124,6 @@ class Contact(index.Indexed, models.Model):
FieldPanel('phone'),
FieldPanel('room'),
FieldPanel('is_active'),
FieldPanel('priority'),
]

search_fields = [
Expand All @@ -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']


Expand Down

0 comments on commit cd95250

Please sign in to comment.