strongbox: check existence of document type (#2622)

This commit is contained in:
Frédéric Péters 2013-03-26 14:59:36 +01:00
parent dd9e9cfbb5
commit 60b0b6ded0
1 changed files with 3 additions and 0 deletions

View File

@ -74,6 +74,9 @@ class StrongboxItem(StorableObject):
if not value:
self.expiration_time = None
return
if not StrongboxType.has_key(self.type_id):
return
if not StrongboxType.get(self.type_id).validation_months:
self.expiration_time = None
return