From e213f3dda0ea2272069347e848507ec0dab47dca Mon Sep 17 00:00:00 2001 From: jnmclarty Date: Wed, 5 Aug 2015 13:17:30 -0400 Subject: [PATCH] BUG: quick fix to zero-length feeds --- trump/indexing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trump/indexing.py b/trump/indexing.py index e11aaa8..09d669b 100644 --- a/trump/indexing.py +++ b/trump/indexing.py @@ -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):