﻿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
26884	update_or_create does not evaluate callables in defaults for update case	Jensen Cochran	Kenneth	"Ticket #26638 added support for accepting callables in the 'defaults' parameter of get_or_create and update_or_create.  In the case where update_or_create is updating, the callables are not evaluated.  I have written a test for update_or_create that demonstrates this behavior (attached).  

Here is the traceback for that test failure:

{{{
======================================================================
FAIL: test_update_callable_default (get_or_create.tests.UpdateOrCreateTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/usr/lib64/python2.7/unittest/case.py"", line 369, in run
    testMethod()
  File ""/home/default/sandbox/django/tests/get_or_create/tests.py"", line 423, in test_update_callable_default
    self.assertEqual(obj.last_name, 'NotHarrison')
  File ""/usr/lib64/python2.7/unittest/case.py"", line 553, in assertEqual
    assertion_func(first, second, msg=msg)
  File ""/usr/lib64/python2.7/unittest/case.py"", line 546, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: <function <lambda> at 0x22d0320> != u'NotHarrison'

----------------------------------------------------------------------
}}}
"	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed	update_or_create		Ready for checkin	1	0	0	0	0	0
