5c935d70a77e — Gustavo Andres Morero tip 7 years ago
fixing boards and organizations update methods.
change for python3 support.
3 files changed, 8 insertions(+), 5 deletions(-)

M trello/__init__.py
M trello/boards.py
M trello/organizations.py
M trello/__init__.py +4 -1
@@ 1,4 1,7 @@ 
-from urllib import quote_plus
+try:
+    from urllib import quote_plus
+except ImportError:
+    from urllib.parse import quote_plus
 from .actions import Actions
 from .boards import Boards
 from .cards import Cards

          
M trello/boards.py +2 -2
@@ 88,8 88,8 @@ class Boards(object):
         resp.raise_for_status()
         return json.loads(resp.content)
 
-    def update(self, board_id, name=None, desc=None, closed=None, idOrganization=None, prefs/permissionLevel=None, prefs/selfJoin=None, prefs/cardCovers=None, prefs/invitations=None, prefs/voting=None, prefs/comments=None):
-        resp = requests.put("https://trello.com/1/boards/%s" % (board_id), params=dict(key=self._apikey, token=self._token), data=dict(name=name, desc=desc, closed=closed, idOrganization=idOrganization, prefs/permissionLevel=prefs/permissionLevel, prefs/selfJoin=prefs/selfJoin, prefs/cardCovers=prefs/cardCovers, prefs/invitations=prefs/invitations, prefs/voting=prefs/voting, prefs/comments=prefs/comments))
+    def update(self, board_id, name=None, desc=None, closed=None, idOrganization=None, prefs_permissionLevel=None, prefs_selfJoin=None, prefs_cardCovers=None, prefs_invitations=None, prefs_voting=None, prefs_comments=None):
+        resp = requests.put("https://trello.com/1/boards/%s" % (board_id), params=dict(key=self._apikey, token=self._token), data=dict(name=name, desc=desc, closed=closed, idOrganization=idOrganization, prefs_permissionLevel=prefs_permissionLevel, prefs_selfJoin=prefs_selfJoin, prefs_cardCovers=prefs_cardCovers, prefs_invitations=prefs_invitations, prefs_voting=prefs_voting, prefs_comments=prefs_comments))
         resp.raise_for_status()
         return json.loads(resp.content)
 

          
M trello/organizations.py +2 -2
@@ 43,8 43,8 @@ class Organizations(object):
         resp.raise_for_status()
         return json.loads(resp.content)
 
-    def update(self, idOrg_or_name, name=None, displayName=None, desc=None, website=None, prefs/permissionLevel=None):
-        resp = requests.put("https://trello.com/1/organizations/%s" % (idOrg_or_name), params=dict(key=self._apikey, token=self._token), data=dict(name=name, displayName=displayName, desc=desc, website=website, prefs/permissionLevel=prefs/permissionLevel))
+    def update(self, idOrg_or_name, name=None, displayName=None, desc=None, website=None, prefs_permissionLevel=None):
+        resp = requests.put("https://trello.com/1/organizations/%s" % (idOrg_or_name), params=dict(key=self._apikey, token=self._token), data=dict(name=name, displayName=displayName, desc=desc, website=website, prefs_permissionLevel=prefs_permissionLevel))
         resp.raise_for_status()
         return json.loads(resp.content)