Procházet zdrojové kódy

HUE-883 [useradmin] Extended DB support

- __package__ does not exist in 2.4 and 2.5 some times.
abec před 13 roky
rodič
revize
3f8bcd3f05
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      apps/useradmin/src/useradmin/models.py

+ 1 - 1
apps/useradmin/src/useradmin/models.py

@@ -223,7 +223,7 @@ def update_app_permissions(**kwargs):
   # Since all apps should have been sync'd before useradmin, referencing them
   # here is functional.
   app = kwargs['app']
-  if app.__package__ == 'useradmin':
+  if app.__name__.startswith('useradmin'):
     current = {}
     try:
       for dp in HuePermission.objects.all():