Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AV-2320: Fix opendata-group add CLI command #2405

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ckan/ckanext/ckanext-ytp_main/ckanext/ytp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,11 @@
@click.option('--dryrun', is_flag=True)
@click.pass_context
def add_to_groups(ctx, dryrun):
context = {'ignore_auth': True}
site_user = get_action(u'get_site_user')({

Check warning on line 537 in ckan/ckanext/ckanext-ytp_main/ckanext/ytp/cli.py

View check run for this annotation

Codecov / codecov/patch

ckan/ckanext/ckanext-ytp_main/ckanext/ytp/cli.py#L537

Added line #L537 was not covered by tests
u'ignore_auth': True},
{}
)
context = {'user': site_user['name'], 'ignore_auth': True}

Check warning on line 541 in ckan/ckanext/ckanext-ytp_main/ckanext/ytp/cli.py

View check run for this annotation

Codecov / codecov/patch

ckan/ckanext/ckanext-ytp_main/ckanext/ytp/cli.py#L541

Added line #L541 was not covered by tests
groups = get_action('group_list')(context, {})
users = get_action('user_list')(context, {})

Expand Down
Loading