Skip to content

Commit

Permalink
Optimise the check
Browse files Browse the repository at this point in the history
  • Loading branch information
imdadahad committed Jan 19, 2017
1 parent 6a48325 commit 5365015
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,7 @@ def format_notification_for_csv(notification):
from app import format_datetime_24h, format_notification_status
# row_number can be 0 so we need to check for it
row_num = notification.get('job_row_number')
if row_num is not None and row_num >= 0:
row_num += 1
else:
row_num = ''
row_num = '' if row_num is None else row_num + 1

return {
'Row number': row_num,
Expand Down

0 comments on commit 5365015

Please sign in to comment.