Mercurial > farol > farolluz
changeset 8:cb8b2a196f0b
Allow Name and Organization in anAcknowledgment to be plural
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Wed, 08 Oct 2014 12:43:34 +0200 |
parents | c924c15bd110 |
children | 4c6e15514a6d |
files | farolluz/cvrf.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/farolluz/cvrf.py Wed Oct 08 11:35:53 2014 +0200 +++ b/farolluz/cvrf.py Wed Oct 08 12:43:34 2014 +0200 @@ -231,18 +231,19 @@ class CVRFAcknowledgment(object): - def __init__(self, name=None, organization=None, description=None, + def __init__(self, names=[], organizations=[], description=None, url=None): - self._name = name - self._organization = organization + self._names = names + self._organizations = organizations self._description = description self._url = url def getTitle(self): - return "%s - %s" % (self._name, self._organization) + return "%s - %s" % (', '.join(self._names), + ', '.join(self._organizations)) def validate(self): - if (not self._name) and (not self._organization) and (not self._description): + if (not self._names) and (not self._organizations) and (not self._description): raise ValidationError('An Acknowledgment must have at least a Name, an Organization or a Description')