Skip to content

Commit

Permalink
fix(gitexporter): avoid manually building query string
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Nov 16, 2024
1 parent efe53d8 commit 264feaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions weblate/gitexport/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_git_info(self) -> None:
def git_receive(self, **kwargs):
return self.client.get(
self.get_git_url(),
QUERY_STRING="?service=git-upload-pack",
{"service": "git-upload-pack"},
CONTENT_TYPE="application/x-git-upload-pack-advertisement",
**kwargs,
)
Expand All @@ -93,7 +93,7 @@ def test_redirect_link(self) -> None:
linked = self.create_link_existing()
response = self.client.get(
self.get_git_url(component=linked),
QUERY_STRING="?service=git-upload-pack",
{"service": "git-upload-pack"},
CONTENT_TYPE="application/x-git-upload-pack-advertisement",
)
self.assertRedirects(
Expand Down
2 changes: 1 addition & 1 deletion weblate/gitexport/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def git_export(request: AuthenticatedHttpRequest, path, git_request):
raise Http404("Not a git repository")
if obj.is_repo_link:
return redirect(
"{}{}".format(
"{}?{}".format(
reverse(
"git-export",
kwargs={
Expand Down

0 comments on commit 264feaa

Please sign in to comment.