Skip to content

Commit

Permalink
BUG: quick fix to zero-length feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
jnmclarty committed Aug 5, 2015
1 parent 6aff5b0 commit e213f3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion trump/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def build_ordf(self, orind, orval, colname):
return self._common_passthrough(ordf)
def _common_passthrough(self, obj):
try:
return getattr(self, '_' + self.case)(obj)
if len(obj.index) > 0:
return getattr(self, '_' + self.case)(obj)
else:
obj.index = self.create_empty()
return obj
except AttributeError:
self._notimp_error()
def _notimp_error(self):
Expand Down

0 comments on commit e213f3d

Please sign in to comment.