Skip to content

Commit

Permalink
Allow None for HyperlinkedRelatedField.get_url(format=) parameter (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
4c0n authored Oct 18, 2023
1 parent 4ae6df6 commit c06c06a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework-stubs/relations.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class HyperlinkedRelatedField(RelatedField[_MT, str, Hyperlink]):
format: str | None = ...,
): ...
def get_object(self, view_name: str, *view_args: Any, **view_kwargs: Any) -> _MT: ...
def get_url(self, obj: Model, view_name: str, request: Request, format: str) -> str | None: ...
def get_url(self, obj: Model, view_name: str, request: Request, format: str | None) -> str | None: ...

class HyperlinkedIdentityField(HyperlinkedRelatedField): ...

Expand Down

0 comments on commit c06c06a

Please sign in to comment.