[attributs] corrige blackliste
This commit is contained in:
parent
649a4e6691
commit
6f0e121045
1 changed files with 3 additions and 2 deletions
|
@ -400,15 +400,16 @@ class blacklist(Attr):
|
|||
legend = u"Blackliste"
|
||||
|
||||
def parse_value(self, bl, ldif):
|
||||
bl_debut, bl_fin, bl_comm = bl.split('$', 3)
|
||||
bl_debut, bl_fin, bl_type, bl_comm = bl.split('$')
|
||||
now = time.time()
|
||||
self.value = { 'debut' : int (bl_debut),
|
||||
'fin' : bl_fin if bl_fin == '-' else int(bl_fin),
|
||||
'type' : bl_type
|
||||
'comm' : bl_comm,
|
||||
'actif' : int(bl_debut) < now and (bl_fin == '-' or int(bl_fin) > now) }
|
||||
|
||||
def __unicode__(self):
|
||||
return u'$%(debut)s$%(fin)s$%(comm)s' % self.value
|
||||
return u'$%(debut)s$%(fin)s$%(type)s$%(comm)s' % self.value
|
||||
|
||||
class historique(Attr):
|
||||
singlevalue = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue