Kaydet (Commit) aabb5842 authored tarafından Marten Kenbeek's avatar Marten Kenbeek Kaydeden (comit) Tim Graham

Refs #23621 -- Fixed warning message when reloading models.

üst 00a1d4d0
......@@ -208,7 +208,7 @@ class Apps(object):
warnings.warn(
"Model '%s.%s' was already registered. "
"Reloading models is not advised as it can lead to inconsistencies, "
"most notably with related models." % (model_name, app_label),
"most notably with related models." % (app_label, model_name),
RuntimeWarning, stacklevel=2)
else:
raise RuntimeError(
......
......@@ -237,7 +237,7 @@ class AppsTests(SimpleTestCase):
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, RuntimeWarning))
self.assertEqual(str(w[-1].message),
"Model 'southponies.apps' was already registered. "
"Model 'apps.southponies' was already registered. "
"Reloading models is not advised as it can lead to inconsistencies, "
"most notably with related models.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment