diff options
author | Duda Dornelles <dudassdornelles@gmail.com> | 2015-01-27 16:26:01 -0200 |
---|---|---|
committer | Pixpoa pairing <pixpoapairing@pixelated-project.org> | 2015-01-27 16:26:01 -0200 |
commit | a211149d2a1bdf21b970cdff1bd5a31a9ecdadaf (patch) | |
tree | 01ee96303bb438e2acfeada4324f98dd1939f4fa /service/pixelated | |
parent | 2f25e6429d9d846632314d093591ad413fac0d9e (diff) |
#184 not creating empty tags of any length (as opposed to only empty strings with len==0)
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/resources/mail_resource.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/pixelated/resources/mail_resource.py b/service/pixelated/resources/mail_resource.py index 396ccd74..fd1d255f 100644 --- a/service/pixelated/resources/mail_resource.py +++ b/service/pixelated/resources/mail_resource.py @@ -15,7 +15,7 @@ class MailTags(Resource): def render_POST(self, request): content_dict = json.loads(request.content.read()) - new_tags = [x.lower() for x in content_dict['newtags'] if x != ''] + new_tags = [x.lower() for x in map(lambda e: e.strip(), content_dict['newtags']) if x != ''] try: self._mail_service.update_tags(self._mail_id, new_tags) mail = self._mail_service.mail(self._mail_id) |