Browse Source

fix router

Élie Bouttier 6 years ago
parent
commit
2c1c27348c
1 changed files with 2 additions and 3 deletions
  1. 2 3
      djadhere/routers.py

+ 2 - 3
djadhere/routers.py

@@ -14,6 +14,5 @@ class PonyAirRouter:
                 or (obj1._meta.app_label != 'ponyair' and obj2._meta.app_label != 'ponyair')
 
     def allow_migrate(self, db, app_label, model_name=None, **hints):
-        if db == 'ponyair' and app_label == 'ponyair':
-            return True
-        return False
+        return (db == 'ponyair' and app_label == 'ponyair') \
+                or (db != 'ponyair' and app_label != 'ponyair')