﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30258	Failed to add CheckConstraint on IntegerRangeField	Tilman Koschnick	Simon Charette	"Adding a CheckConstraint like:

{{{
constraints = (
    m.CheckConstraint(check=m.Q(precipitation_probability__contained_by=NumericRange(0, 101)), name='precipitation_percent_range'),
)
}}}

resulted in the following error (full traceback attached):

django.db.utils.ProgrammingError: syntax error at or near ""object""
LINE 1: ...obability"" <@ <psycopg2._range.NumberRangeAdapter object at ...

The attached patch fixes the issue for me."	Bug	closed	Database layer (models, ORM)	2.2	Release blocker	fixed			Accepted	1	0	0	0	0	0
