Skip to content

Commit

Permalink
Merge pull request #4 from Som-Energia/ADD_filter_cch
Browse files Browse the repository at this point in the history
add filter cch
  • Loading branch information
David Riera committed May 11, 2021
2 parents e9e077c + 82050c6 commit 503a226
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions heman/api/infoenergia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def options(self, *args, **kwargs):

def get_last_infoenergia_report(self, contract_name):
return mongo.db['infoenergia_reports'].find_one(
{'contractName': contract_name},
sort=[('month', pymongo.DESCENDING)]
{'contractName': contract_name, 'type': 'CCH'},
sort=[('month', pymongo.DESCENDING), ('id', pymongo.DESCENDING)]
)


Expand Down

0 comments on commit 503a226

Please sign in to comment.