Skip to content

Commit

Permalink
update to shelter get pets method and commit latest docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
aschleg committed Apr 4, 2018
1 parent 1186539 commit 9e92bdf
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 2 deletions.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/versions.doctree
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/build/html/_sources/versions.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Version 1.7.1

- Fix to the :code:`shelter_get()` method for handling empty responses when no shelters returned for when
the parameter :code:`return_df = True`.
- Fix to getting pets available at a shelter with :code:`shelter_get_pets()` when the parameter
:code:`return_df = True` when the given shelter does not return any available animals.

Verison 1.7.0
-------------
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/build/html/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ <h2>Version 1.7.1<a class="headerlink" href="#version-1-7-1" title="Permalink to
<ul class="simple">
<li>Fix to the <code class="code docutils literal"><span class="pre">shelter_get()</span></code> method for handling empty responses when no shelters returned for when
the parameter <code class="code docutils literal"><span class="pre">return_df</span> <span class="pre">=</span> <span class="pre">True</span></code>.</li>
<li>Fix to getting pets available at a shelter with <code class="code docutils literal"><span class="pre">shelter_get_pets()</span></code> when the parameter
<code class="code docutils literal"><span class="pre">return_df</span> <span class="pre">=</span> <span class="pre">True</span></code> when the given shelter does not return any available animals.</li>
</ul>
</div>
<div class="section" id="verison-1-7-0">
Expand Down
2 changes: 2 additions & 0 deletions docs/source/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Version 1.7.1

- Fix to the :code:`shelter_get()` method for handling empty responses when no shelters returned for when
the parameter :code:`return_df = True`.
- Fix to getting pets available at a shelter with :code:`shelter_get_pets()` when the parameter
:code:`return_df = True` when the given shelter does not return any available animals.

Verison 1.7.0
-------------
Expand Down
5 changes: 4 additions & 1 deletion petpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,10 @@ def _coerce_to_dataframe(x, method):
elif method == 'pet.find' or method == 'shelter.getPets':
res = media_df = opt_df = breed_df = DataFrame()

if x['petfinder']['pets'] == {}:
try:
if x['petfinder']['pets'] == {}:
return DataFrame()
except KeyError:
return DataFrame()

else:
Expand Down

0 comments on commit 9e92bdf

Please sign in to comment.