-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fixing qiita_db/data.py #1327
Fixing qiita_db/data.py #1327
Conversation
raw_data_count = TRN.execute_fetchlast() | ||
if raw_data_count == 1 and RawData(raw_data_id).get_filepath_ids(): | ||
raise QiitaDBError( | ||
"Raw data (%d) can't be remove because it has linked " |
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.
It was like this before but ... remove->removed
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.
Done
👍 Looks good, just one question! |
(status, self._id)) | ||
with TRN: | ||
if (status not in ('idle', 'linking', 'unlinking') and | ||
not status.startswith('failed')): |
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.
Not sure why flake8 is not complaining about this one ...
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.
flake8 treats if statements differently for indentation, since the things in the if statement are already indented once. This means the next line of the if needs to be indented twice so you can tell the difference between lines in the if and the continuation of the if.
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.
That's is correct, flake 8 will fail if I indent back this line.
One minor comment. |
I did not forget about this, I will address the reviews and finish the rest of the PR today 😄 |
@antgonza @ElDeveloper comments addressed |
Fixes the objects under data.py
A couple of comments:
check_subclass
. This is not needed as the base class cannot be instantiated, so I removed those calls.RawData.create
had aif filepaths
as if they're optional, but it is actually a required parameter.