Skip to content

Commit

Permalink
fix(parser)supplied_by_manufacturer): float value
Browse files Browse the repository at this point in the history
receiving inconsistent data type from NIJZ;
moderna on 2021-04-08 is float
NIJZ may fix in the future
  • Loading branch information
jalezi committed Apr 11, 2021
1 parent 6a46963 commit 962014c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cepimose/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,20 @@ def get_manufacturer(num):
# all data
date = parse_date(C[0])
manufacturer = get_manufacturer((C[1]))
value = C[2]
value = int(C[2])
setattr(manu_row, "date", date)
setattr(manu_row, manufacturer, value)

if R == 1:
# same date as previous
manufacturer = get_manufacturer((C[0]))
value = C[1]
value = int(C[1])
setattr(parsed_data[-1], manufacturer, value)

if R == 2:
# same manufacturer as previous
date = parse_date(C[0])
value = C[1]
value = int(C[1])
setattr(manu_row, "date", date)
setattr(manu_row, manufacturer, value)

Expand Down

0 comments on commit 962014c

Please sign in to comment.