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

Set is_root=True for old folders set as root_node for existing NodeSettings [PLAT-578] #8537

Conversation

erinspace
Copy link
Member

Purpose

The new get_root method in the OsfStorageFolderManager relies on is_root=True being set for all root folders. This is the case for new nodes as that setting happens in the on_add method of osfstorage's NodeSettings model.

Changes

  • Set is_root=True for all OsfStorageFolder objects that have a fk relationship to a NodeSettings model, as those are all root folders.

QA Notes

We'll do QA on this one!

Documentation

None necessary

Side Effects

None anticipated

Ticket

https://openscience.atlassian.net/browse/PLAT-578

@erinspace erinspace force-pushed the feature/update_old_root_nodes branch from 5c9f56e to 191e041 Compare July 12, 2018 14:04
@sloria
Copy link
Contributor

sloria commented Jul 13, 2018

Tested locally on local prod backup. Took ~3m24s:

python manage.py migrate  10.47s user 1.89s system 6% cpu 3:23.93 total

@sloria sloria merged commit 256e1d1 into CenterForOpenScience:feature/files-on-anything Jul 13, 2018
@sloria sloria deleted the feature/update_old_root_nodes branch July 13, 2018 14:05
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