Conversation
4b7f4fd
to
0d8d6a2
Compare
| @@ -23,7 +23,7 @@ class HrefWritableRepositoryRelatedField(serializers.HyperlinkedRelatedField): | |||
| read_only should passed as a kwarg to this field. | |||
| """ | |||
| view_name = 'repositories-detail' | |||
| lookup_field = 'name' | |||
| lookup_field = 'pk' | |||
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.
Do you need to specify pk as a lookup_field explicitly? I think it's a default.
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 believe you are correct. I'll test without it and see if it still works.
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.
removing the lookup_field seems to work. however, i am not sure what other places in this PR could use a similar change.
0d8d6a2
to
5df14d3
Compare
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.
Thanks, @dkliban !
Changes look good to me. Please, make sure team is on board with this change before merging it.
Solution: use repository id in the URL instead of name This patch switches repository URI from /api/v3/repositories/<name>/ to /api/v3/repositories/<pk>/. closes pulp#3101 https://pulp.plan.io/issues/3101
5df14d3
to
da25c23
Compare
Solution: use repository id in the URL instead of name
This patch switches repository URI from
/api/v3/repositories/<name>/to/api/v3/repositories/<pk>/.closes #3101
https://pulp.plan.io/issues/3101