Skip to content

Instantly share code, notes, and snippets.

@alikins
Created August 12, 2020 15:33
Show Gist options
  • Save alikins/3e100b85acc397ecedbc1b82e36d8b25 to your computer and use it in GitHub Desktop.
Save alikins/3e100b85acc397ecedbc1b82e36d8b25 to your computer and use it in GitHub Desktop.
galaxy_ng rbac migrate after import apply_perms
Operations to perform:
Apply all migrations: admin, ansible, auth, authtoken, container, contenttypes, core, galaxy, guardian, sessions
Running migrations:
Applying galaxy.0004_rbac...Traceback (most recent call last):
File "/venv/bin/django-admin", line 8, in <module>
sys.exit(execute_from_command_line())
File "/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/venv/lib64/python3.6/site-packages/django/core/management/commands/migrate.py", line 234, in handle
fake_initial=fake_initial,
File "/venv/lib64/python3.6/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/venv/lib64/python3.6/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/venv/lib64/python3.6/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
state = migration.apply(state, schema_editor)
File "/venv/lib64/python3.6/site-packages/django/db/migrations/migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/venv/lib64/python3.6/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
self.code(from_state.apps, schema_editor)
File "/src/galaxy_ng/galaxy_ng/app/migrations/0004_rbac.py", line 10, in convert_namespace_groups_to_permissions
assign_perm('galaxy.change_namespace', group, namespace)
File "/venv/lib64/python3.6/site-packages/guardian/shortcuts.py", line 86, in assign_perm
user, group = get_identity(user_or_group)
File "/venv/lib64/python3.6/site-packages/guardian/utils.py", line 91, in get_identity
"(got %s)" % identity)
guardian.exceptions.NotUserNorGroup: User/AnonymousUser or Group instance is required (got Group object (1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment