From 227a4c48be18a439f0a08a49bf1f3062babeee82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anssi=20K=C3=A4=C3=A4ri=C3=A4inen?= Date: Tue, 23 Dec 2014 12:01:58 +0200 Subject: [PATCH] Refs #2443 -- fixed format_dtdelta on SQLite A test failed on Python 2 32-bit. --- django/db/backends/sqlite3/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 5e23474db1b..73fc99ac07a 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -599,12 +599,12 @@ def _sqlite_format_dtdelta(conn, lhs, rhs): - A string representing a datetime """ try: - if isinstance(lhs, int): + if isinstance(lhs, six.integer_types): lhs = str(decimal.Decimal(lhs) / decimal.Decimal(1000000)) real_lhs = parse_duration(lhs) if real_lhs is None: real_lhs = backend_utils.typecast_timestamp(lhs) - if isinstance(rhs, int): + if isinstance(rhs, six.integer_types): rhs = str(decimal.Decimal(rhs) / decimal.Decimal(1000000)) real_rhs = parse_duration(rhs) if real_rhs is None: