Fix creation of "Basic Admin" group, at long last.

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2652 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/management.py b/frontend/afe/management.py
index ed71a9b..bb0c569 100644
--- a/frontend/afe/management.py
+++ b/frontend/afe/management.py
@@ -3,8 +3,14 @@
 from django.dispatch import dispatcher
 from django.db.models import signals
 from django.contrib import auth
-import common
-from autotest_lib.frontend.afe import models
+# In this file, it is critical that we import models *just like this*.  In
+# particular, we *cannot* do import common; from autotest_lib... import models.
+# This is becasue when we pass the models module to dispatcher.connect(), it
+# calls id() on the module, and the id() of a module can differ depending on how
+# it was imported.  For that reason, we must import models as Django does -- not
+# through the autotest_lib magic set up through common.py.  If you do that, the
+# connection won't work and the dispatcher will simply never call the method.
+from frontend.afe import models
 
 BASIC_ADMIN = 'Basic admin'