Closed simonb83 closed 7 years ago
Hi @simonb83 , I used this solution (https://github.com/ghewgill/text2num/blob/master/text2num.py) and improved it to accept also numbers and lists as input. This should do the work, right? Should I put it directly in the model init?
Prior to saving reports to database quantities need to be converted to integers.
In some cases this is trivial (i.e. 500, 684), however there are other cases that need more work for example 'thousand', 'hundreds' etc.
Probably the best place to implement the conversion is in
Report.__init__