|
@@ -300,7 +300,7 @@ class MongodbHandler:
|
|
|
except Exception as error:
|
|
|
self._log.log_and_raise_error(('A problem occured when aggregating the collection {} with the pipeline {}. \nError: {}').format(collection_name, aggregation_pipeline, error))
|
|
|
return None
|
|
|
- if data.collection.count_documents(aggregation_pipeline) != 0:
|
|
|
+ if data.collection.count_documents(aggregation_pipeline) != 0:
|
|
|
if return_as_dataframe:
|
|
|
return self.convert_mongo_data_into_dataframe(data, index, collection_name)
|
|
|
else:
|
|
@@ -349,7 +349,7 @@ class MongodbHandler:
|
|
|
if len(frames) > 1:
|
|
|
return_df = pd.concat(frames, axis=0, sort=False)
|
|
|
else:
|
|
|
- if not frames:
|
|
|
+ if len(frames) == 0:
|
|
|
self._log.warning('Query returned empty Cursor')
|
|
|
return_df = pd.DataFrame()
|
|
|
else:
|