Skip to content

Commit

Permalink
Merge pull request #175 from Syncano/fixes
Browse files Browse the repository at this point in the history
[FIXES]
  • Loading branch information
opalczynski committed Mar 23, 2016
2 parents f8ab5f3 + bf6bbe0 commit 9a35926
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
line_length=120
multi_line_output=3
default_section=THIRDPARTY
skip=base.py,.tox
skip=base.py,.tox,conf.py
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
from os.path import abspath, dirname

import sphinx_rtd_theme
from syncano.models.fields import RelatedManagerField

sys.path.insert(1, dirname(dirname(dirname(abspath(__file__)))))
from syncano.models.fields import RelatedManagerField


needs_sphinx = '1.0'
extensions = [
Expand Down
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Contents:

getting_started
interacting
models
refs/syncano


Expand Down
10 changes: 0 additions & 10 deletions docs/source/models.rst

This file was deleted.

1 change: 1 addition & 0 deletions syncano/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def connect(*args, **kwargs):
:return: A models registry
Usage::
# Admin login
connection = syncano.connect(email='', password='')
# OR
Expand Down
1 change: 1 addition & 0 deletions syncano/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ def __getattribute__(self, item):
try:
return super(LinksWrapper, self).__getattribute__(item)
except AttributeError:
item = item.replace('_', '-')
if item not in self.links_dict or item in self.ignored_links:
raise
return self.links_dict[item]
Expand Down
3 changes: 2 additions & 1 deletion syncano/models/incentives.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ def run(self, **payload):
connection = self._get_connection(**payload)

response = connection.request('POST', endpoint, **{'data': payload})
if 'result' in response and 'stdout' in response['result']:

if isinstance(response, dict) and 'result' in response and 'stdout' in response['result']:
response.update({'instance_name': self.instance_name,
'script_name': self.name})
return ScriptEndpointTrace(**response)
Expand Down

0 comments on commit 9a35926

Please sign in to comment.