Fix for #18593 (Admin change list swallows unrelated AttributeErrors from callable display fields) #193

wants to merge 3 commits into


None yet

3 participants

@charettes charettes and 1 other commented on an outdated diff Jul 8, 2012
row_html = '<tbody><tr class="row1"><th><a href="%d/">name</a></th><td class="nowrap">Parent object</td></tr></tbody>' %
self.assertFalse(table_output.find(row_html) == -1,
'Failed to find expected row element: %s' % table_output)
+ def test_result_list_errors_propagate(self):
+ """
+ Regression test for #18593: user AttributeErrors from callable
+ display fields should not be swallowed.
charettes Jul 8, 2012

Identation typo

pjdelport Jul 9, 2012

D'oh! Thanks.

pjdelport added some commits Jul 8, 2012
@pjdelport pjdelport Fix and regression test for #18593.
This stops the admin change list from interpreting unrelated
AttributeErrors from user code as empty fields.
@pjdelport pjdelport Fix a test suite bug that was masked by #18593.
callable_year() now matches model_year() and modeladmin_year().

Updated, without typo.

Django member

Thanks for your contribution. #357 had pretty much the same solution, but with cleaner tests.

@aaugustin aaugustin closed this Sep 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment