Fixed deprecation warning

This commit is contained in:
Ross Lawley 2012-11-27 14:01:58 +00:00
parent 003454573c
commit 027b3d36de

View File

@ -251,7 +251,7 @@ class QuerySet(object):
"""
msg = ("get_or_create is scheduled to be deprecated. The approach is "
"flawed without transactions. Upserts should be preferred.")
raise DeprecationWarning(msg)
warnings.warn(msg, DeprecationWarning)
defaults = query.get('defaults', {})
if 'defaults' in query: