We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d8b6e9 commit 5371f79Copy full SHA for 5371f79
django_enum/tests/tests.py
@@ -71,13 +71,15 @@
71
###############################################################################
72
# monkey patch a fix to django oracle backend bug, blocks all oracle tests
73
from django.db.backends.oracle.schema import DatabaseSchemaEditor
74
-
+from django.utils.duration import duration_iso_string
75
quote_value = DatabaseSchemaEditor.quote_value
76
77
78
def quote_value_patched(self, value):
79
if isinstance(value, date) and not isinstance(value, datetime):
80
return "DATE '%s'" % value.isoformat()
81
+ elif isinstance(value, timedelta):
82
+ return "'%s'" % duration_iso_string(value)
83
return quote_value(self, value)
84
85
0 commit comments