Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1488 from mfalesni/rest-api-filter
Browse files Browse the repository at this point in the history
Reflect API change sqlfilter.
  • Loading branch information
psav committed Jan 6, 2015
2 parents b3a3c56 + 597240b commit 46091bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def _result_processor(result):


def find_template_by_name(template_name):
return _result_processor(
api().templates().get(sqlfilter="name = '{}'".format(template_name), expand="resources")
)["resources"]
return filter(
lambda r: r["name"] == template_name,
_result_processor(api().templates().get(expand="resources"))["resources"])


def get_template_guid(template):
Expand Down

0 comments on commit 46091bc

Please sign in to comment.