Convert read column into proper type with SQLite
As SQLite has few basic types, we must use column names cast parsing to ensure to read values in proper type. issue9652 review310801004
This commit is contained in:
1 parent
89e171586f
commit
c83cfdfb26
1 file changed
+4
-4
@@ -104,10 +104,10 @@ Check cost history::
|
||||
>>> [c.cost_price for c in ProductCostHistory.find([], order=order)] == [
|
||||
... Decimal('100.0000'), Decimal('120.0000'), Decimal('110.0000')]
|
||||
True
|
||||
>>> [str(c.date) for c in ProductCostHistory.find([], order=order)] == [
|
||||
... str(today - dt.timedelta(days=2)),
|
||||
... str(today - dt.timedelta(days=1)),
|
||||
... str(today)]
|
||||
>>> [c.date for c in ProductCostHistory.find([], order=order)] == [
|
||||
... today - dt.timedelta(days=2),
|
||||
... today - dt.timedelta(days=1),
|
||||
... today]
|
||||
True
|
||||
|
||||
Check cost price history on product::
|
||||
|
||||
Reference in new issue
Block a user