Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ae8a558

Browse files
authored
Bug when the word Bearer in not present in the Key
When the word is not present, the variable token used is not from the class, so is not reflected in the header.
1 parent 1bf3ade commit ae8a558

File tree

1 file changed

+2
-2
lines changed
  • pipefy.py

1 file changed

+2
-2
lines changed

pipefy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Pipefy(object):
1313

1414
def __init__(self, token, mock_server=False):
1515
self.token = token if 'Bearer' in token else 'Bearer %s' % token
16-
self.headers = {'Content-Type': 'application/json', 'Authorization': token}
16+
self.headers = {'Content-Type': 'application/json', 'Authorization': self.token}
1717
self.endpoint = 'https://app.pipefy.com/queries'
1818
if mock_server:
1919
self.endpoint = 'https://private-a6c28-pipefypipe.apiary-mock.com/queries'
@@ -997,4 +997,4 @@ def deleteTableRecord(self, id, response_fields=None, headers={}):
997997
'id': json.dumps(id),
998998
'response_fields': response_fields,
999999
}
1000-
return self.request(query, headers).get('data', {}).get('deleteTableRecord', {})
1000+
return self.request(query, headers).get('data', {}).get('deleteTableRecord', {})

0 commit comments

Comments
(0)