Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Commit 35f703e

Browse files
committed
Bugfix for when link has no associated action
1 parent e3961f5 commit 35f703e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

coreapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from coreapi.transport import BaseTransport, HTTPTransport
77

88

9-
__version__ = '1.2.5'
9+
__version__ = '1.2.6'
1010
__all__ = [
1111
'BaseCodec', 'CoreJSONCodec', 'HTMLCodec', 'PlainTextCodec', 'PythonCodec',
1212
'negotiate_encoder', 'negotiate_decoder',

coreapi/transport.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def make_http_request(self, session, url, action=None, params=None):
4343
"""
4444
Make an HTTP request and return an HTTP response.
4545
"""
46-
method = 'GET' if (action is None) else action.upper()
46+
if not action:
47+
method = 'GET'
48+
else:
49+
method = action.upper()
4750
accept = session.get_accept_header()
4851

4952
if params and method == 'GET':

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy