[fix] [hot] make_random

This commit is contained in:
Rushabh Mehta 2015-07-30 13:39:27 +05:30
parent 84efee471b
commit bf24fb2898

View file

@ -29,7 +29,7 @@ def get_random(doctype, filters=None):
condition = []
if filters:
for key, val in filters.items():
condition.append("%s='%s'" % (key, val.replace("'", "\'")))
condition.append("%s='%s'" % (key, str(val).replace("'", "\'")))
if condition:
condition = " where " + " and ".join(condition)
else: