Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix a bug in the search_engine method
this bug made `search_engine` method virtually unusable, because it generated incorrect search URL.

made `%` instead of `format` function, as everywhere else in the code.
  • Loading branch information
szelga authored Nov 28, 2019
commit e04262ada8301b0e48e976dd01c0351cf87eb91d
2 changes: 1 addition & 1 deletion glpi/glpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def search_engine(self, item_name, criteria):
# build searchtype argument
# -> optional! defaults to "contains" on the server if empty
if 'searchtype' in c and c['searchtype'] is not None:
uri = (uri + "&criteria[%d][searchtype]=%s".format(idx,
uri = (uri + "&criteria[%d][searchtype]=%s" % (idx,
c['searchtype']))
else:
uri = uri + "&criteria[%d][searchtype]=" % (idx)
Expand Down