From b4f45a619f15332343d188c668192966da642d09 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Mon, 17 Aug 2015 16:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oj/db_router.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/oj/db_router.py b/oj/db_router.py index bd174cd..d8c1659 100644 --- a/oj/db_router.py +++ b/oj/db_router.py @@ -18,13 +18,6 @@ class DBRouter(object): def allow_migrate(self, db, app_label, model=None, **hints): if app_label == "submission": if db == "submission": - r = True - else: - r = False + return db == app_label else: - if db == "default": - r = True - else: - r = False - print db, app_label, r - return r \ No newline at end of file + return db == "default" \ No newline at end of file