Skip to content

Don't allow to create subprojects with same alias #5404

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

Merged
merged 7 commits into from
Apr 4, 2019

Conversation

saadmk11
Copy link
Member

@saadmk11 saadmk11 commented Mar 6, 2019

Added a clean_alias method in the ProjectRelationshipBaseForm which will check if the alias already exists. This will prevent Projects from Creating New subprojects with same alias.
closes #5402

@saadmk11 saadmk11 changed the title Added clean method for subproject alias. Don't allow to create subprojects with same alias Mar 6, 2019
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

Looks good, but we need to add some tests for this before merging.

@stsewd stsewd added the Needed: tests Tests are required label Mar 6, 2019
@saadmk11
Copy link
Member Author

saadmk11 commented Mar 6, 2019

@stsewd Okay. I'll add some tests and update the PR.

@saadmk11
Copy link
Member Author

saadmk11 commented Mar 7, 2019

@stsewd I have Added some Tests and Updated the PR.

Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

@saadmk11
Copy link
Member Author

saadmk11 commented Mar 8, 2019

@stsewd Thanks for pointing it out. I couldn’t find the existing test case as the name is different. I'll move the tests here and update the PR.

@saadmk11
Copy link
Member Author

saadmk11 commented Mar 8, 2019

@stsewd Moved the tests to test_subprojects.py

@stsewd stsewd removed the Needed: tests Tests are required label Mar 11, 2019
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

I think some tests are already there, but the test for the alias is correct 👍

@saadmk11
Copy link
Member Author

@stsewd Should I remove the tests that are already there or this can be merged?

@stsewd
Copy link
Member

stsewd commented Mar 11, 2019

You can try to identify the repeated tests, but it's fine for me.

@saadmk11
Copy link
Member Author

@stsewd okay cool.

@saadmk11
Copy link
Member Author

@stsewd Removed Repeated tests. :)

@stsewd stsewd requested a review from a team March 21, 2019 16:06
@stsewd
Copy link
Member

stsewd commented Apr 4, 2019

Tested this locally, it's working

@stsewd stsewd merged commit ee5ffd0 into readthedocs:master Apr 4, 2019
@saadmk11 saadmk11 deleted the subproject-alias branch April 4, 2019 15: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.

Don't allow to create subprojects with same alias
2 participants