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

Fix error when checking is_admin #501

Merged
merged 3 commits into from
Jan 8, 2019
Merged

Conversation

talavis
Copy link
Contributor

@talavis talavis commented Dec 20, 2018

Describe the pull request:

  • Bug fix
  • Functional change
  • New feature
  • Code cleanup
  • Build system change
  • Documentation change
  • Language translation

Pull request long description:

is_admin was raising an AttributeError as version was a string, and did thus not have the member dataset. It will now use the dataset_version object instead.
Fixing the problem also identified the problem that the function continued after send_error(), causing finish() to be called twice.
The same problem also occurs with calling finish inside (not at the end of) a function.

Changes made:

  1. version.dataset -> dataset_version.dataset
  2. added return after send_error()
  3. added return after finish() in two places

Copy link
Member

@kusalananda kusalananda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look ok to me.

@kusalananda kusalananda merged commit 946d2d0 into develop Jan 8, 2019
@kusalananda kusalananda deleted the bugfix/linus-isadmin branch January 8, 2019 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants