-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add delete --attribute option #120
Add delete --attribute option #120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introducing encoding issues can be prevented by using the MOLGENIS Python API client that is responsible for escaping URL components. This client should use a RSQL client that is responsible for escaping query values.
mcmd/commands/delete.py
Outdated
if args.force or (not args.force and io.confirm( | ||
'Are you sure you want to delete attribute {} of entity type {}?'.format(args.attribute, args.resource))): | ||
io.start('Deleting attribute {} of entity {}'.format(highlight(args.attribute), highlight(args.resource))) | ||
response = client.get(urljoin(config.api('rest2'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encoding issues (see comments in #118)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encoding will be done in the api
module as soon as #118 is merged
mcmd/commands/delete.py
Outdated
'sys_md_Attribute?q=entity=={};name=={}'.format(args.resource, | ||
args.attribute))) | ||
attribute_id = response.json()['items'][0]['id'] | ||
client.delete(urljoin(config.api('rest2'), 'sys_md_Attribute/{}'.format(attribute_id))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encoding issues (see comments in #118)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encoding will be done in the api module as soon as #118 is merged
…ommander into feature/delete-attribute
Checklist