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
Allow content to be copied by href #1602
Conversation
Hello @daviddavis! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-02-20 17:37:02 UTC |
@@ -614,6 +614,11 @@ class CopySerializer(serializers.Serializer): | |||
required=False, | |||
) | |||
|
|||
content = serializers.ListField( |
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.
Open to suggestions about this parameter name, etc.
@@ -78,22 +89,11 @@ def _do_test(self, criteria, expected_results): | |||
get_added_content_summary(dest_repo), expected_results, | |||
) | |||
|
|||
def test_copy_none(self): |
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.
I removed the ability to copy nothing. Not sure there was a use case for it?
if 'criteria' in data and 'content' in data: | ||
raise serializers.ValidationError( | ||
_("Criteria and content fields cannot both be set.") | ||
) |
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.
I'm debating about dropping this? I think Katello will want to specify hrefs and criteria.
8d236c5
to
82a9ccc
Compare
48e90da
to
3bd7515
Compare
3bd7515
to
6fa9221
Compare
Could you leave a link to the issue in your commit, and also add to the issue an API usage example that documents how it works? |
6fa9221
to
966a8f8
Compare
@dalley done. let me know if you have any other feedback. |
LGTM. I will be out tomorrow so feel free to merge. |
fixes #6019
https://pulp.plan.io/issues/6019