Skip to content

Commit

Permalink
fix: add improperly configured exception in load permissions function
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanttV committed Jul 17, 2024
1 parent 1506325 commit 056afe4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eox_core/api/v1/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from django.conf import settings
from django.contrib.auth.models import Permission, User
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured
from django.db.utils import ProgrammingError
from rest_framework import exceptions, permissions

Expand All @@ -23,7 +24,7 @@ def load_permissions():
name='Can access eox-core API',
content_type=content_type,
)
except ProgrammingError:
except (ProgrammingError, ImproperlyConfigured):
# This code runs when the app is loaded, if a migration has not been done a ProgrammingError exception is raised
# we are bypassing those cases to let migrations run smoothly.
pass
Expand Down

0 comments on commit 056afe4

Please sign in to comment.