Skip to content

Commit

Permalink
Merge pull request #51 from jamilatta/none_string_on_strip_method_on_…
Browse files Browse the repository at this point in the history
…noneatributes

None string on strip method on noneatributes
  • Loading branch information
jfunez authored Jul 27, 2017
2 parents 1875c36 + 782ddc8 commit 7e480a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions legendarium/urlegendarium.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ def __init__(self, acron='', year_pub='', volume='', number='',
fpage='', fpage_sequence='', lpage='', article_id='',
suppl_number='', doi='', order=''):

self.acron = str(acron).strip()
self.year_pub = str(year_pub).strip()
self.volume = str(volume).strip()
self.number = str(number).strip()
self.suppl_number = str(suppl_number).strip()
self.fpage = str(fpage).strip()
self.fpage_sequence = str(fpage_sequence).strip()
self.lpage = str(lpage).strip()
self.article_id = str(article_id).strip()
self.doi = str(doi).strip()
self.order = str(order).strip()
self.acron = str(acron).strip() if acron else ''
self.year_pub = str(year_pub).strip() if year_pub else ''
self.volume = str(volume).strip() if volume else ''
self.number = str(number).strip() if number else ''
self.suppl_number = str(suppl_number).strip() if suppl_number else ''
self.fpage = str(fpage).strip() if fpage else ''
self.fpage_sequence = str(fpage_sequence).strip() if fpage_sequence else ''
self.lpage = str(lpage).strip() if lpage else ''
self.article_id = str(article_id).strip() if article_id else ''
self.doi = str(doi).strip() if doi else ''
self.order = str(order).strip() if order else ''

def __unicode__(self):
return self.url_article
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setup(
name='legendarium',
version='2.0.1',
version='2.0.2',
description="Python library to handle SciELO's bibliographic legend",
long_description=readme + '\n\n' + history,
author="Jamil Atta Junior",
Expand Down

0 comments on commit 7e480a4

Please sign in to comment.