Commit 7f6dd7de by Szabolcs Gelencser

Fix startup.py migrations

parent 49d1f881
...@@ -713,7 +713,7 @@ def role_delete(request, role_id): ...@@ -713,7 +713,7 @@ def role_delete(request, role_id):
def role_list(request, filters=None): def role_list(request, filters=None):
"""Returns a global list of available roles.""" """Returns a global list of available roles."""
manager = keystoneclient(request, admin=True).roles manager = keystoneclient(request).roles
roles = [] roles = []
kwargs = {} kwargs = {}
if filters is not None: if filters is not None:
...@@ -733,7 +733,7 @@ def role_list(request, filters=None): ...@@ -733,7 +733,7 @@ def role_list(request, filters=None):
def roles_for_user(request, user, project=None, domain=None): def roles_for_user(request, user, project=None, domain=None):
"""Returns a list of user roles scoped to a project or domain.""" """Returns a list of user roles scoped to a project or domain."""
manager = keystoneclient(request, admin=True).roles manager = keystoneclient(request).roles
if VERSIONS.active < 3: if VERSIONS.active < 3:
return manager.roles_for_user(user, project) return manager.roles_for_user(user, project)
else: else:
......
from django.conf import settings from django.conf import settings
from django.apps import AppConfig from django.apps import AppConfig
from django.db import OperationalError
class DefaultLeaseConfig(AppConfig): class DefaultLeaseConfig(AppConfig):
...@@ -16,3 +17,5 @@ class DefaultLeaseConfig(AppConfig): ...@@ -16,3 +17,5 @@ class DefaultLeaseConfig(AppConfig):
suspend_interval_seconds=settings.DEFAULT_LEASE_SUSPEND_SECONDS, suspend_interval_seconds=settings.DEFAULT_LEASE_SUSPEND_SECONDS,
delete_interval_seconds=settings.DEFAULT_LEASE_DELETE_SECONDS, delete_interval_seconds=settings.DEFAULT_LEASE_DELETE_SECONDS,
).save() ).save()
except OperationalError:
pass # this could be raised on migration
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment