Skip to content

v3 API doesn't check if a subproject relationship already exists #6271

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

Closed
ghost opened this issue Oct 10, 2019 · 7 comments · Fixed by #6275
Closed

v3 API doesn't check if a subproject relationship already exists #6271

ghost opened this issue Oct 10, 2019 · 7 comments · Fixed by #6275
Assignees
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@ghost
Copy link

ghost commented Oct 10, 2019

Details

  • Read the Docs project URL:
  • Build URL (if applicable):
  • Read the Docs username (if applicable):

Expected Result

Only one subproject relation should be allowed.

Actual Result

When creating a subproject relationship, the v3 API does not check that there is not already a relationship and will allow the creation. Also, once there is more than one relation to the same project, it can no longer be deleted via API or GUI.
dupes

@stsewd
Copy link
Member

stsewd commented Oct 10, 2019

Looks like we allow that on the GUI too, we only modify the queryset, but we don't really check if the subproject is valid

def test_excludes_existing_subprojects(self):

Also, once there is more than one relation to the same project, it can no longer be deleted via API or GUI.

You can do it from the edit button, does it give you an error?

@stsewd stsewd added Accepted Accepted issue on our roadmap Bug A bug labels Oct 10, 2019
@ghost
Copy link
Author

ghost commented Oct 10, 2019

You can do it from the edit button, does it give you an error?

Clicking the edit button gives me the fail whale.

@stsewd
Copy link
Member

stsewd commented Oct 10, 2019

Which relationship do you want to delete? I can delete it manually for you.

@ghost
Copy link
Author

ghost commented Oct 10, 2019

Thanks, you can delete all four. Account lf-oran, under dwproj.

@stsewd
Copy link
Member

stsewd commented Oct 10, 2019

Done, let me know if it looks correct now

@ghost
Copy link
Author

ghost commented Oct 10, 2019 via email

@humitos
Copy link
Member

humitos commented Oct 11, 2019

Good catch, @dwt2! Thanks for reporting this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants