mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-01 15:54:53 +00:00
Add property to return the negative id of a listgroup
This is used so we can reference the group as a negative id number from a template, which is the standard way we separate it from lists when included in the same dropdowns.
This commit is contained in:
@ -8,6 +8,10 @@ class MailingListGroup(PgModel, models.Model):
|
||||
|
||||
purge_urls = ('/community/lists/', )
|
||||
|
||||
@property
|
||||
def negid(self):
|
||||
return -self.id
|
||||
|
||||
def __unicode__(self):
|
||||
return self.groupname
|
||||
|
||||
|
Reference in New Issue
Block a user