Skip to content

Commit

Permalink
Fix int value not set correctly issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
weijia committed Jun 26, 2017
1 parent 018eab6 commit e67bc2f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django_excel_to_model/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def format_number(self, cell):
# Its format is General, so no additional fractional part should be displayed
if cell.value == float(int(cell.value)):
return int(cell.value)
elif cell.value == int(cell.value):
return int(cell.value)
return cell.value

def get_format_info(self, cell):
Expand Down

0 comments on commit e67bc2f

Please sign in to comment.