[open-ils-commits] r8361 - trunk/Open-ILS/src/python/oils/utils
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 9 10:17:21 EST 2008
Author: erickson
Date: 2008-01-09 09:52:48 -0500 (Wed, 09 Jan 2008)
New Revision: 8361
Modified:
trunk/Open-ILS/src/python/oils/utils/utils.py
Log:
added an is_true function
Modified: trunk/Open-ILS/src/python/oils/utils/utils.py
===================================================================
--- trunk/Open-ILS/src/python/oils/utils/utils.py 2008-01-09 14:39:47 UTC (rev 8360)
+++ trunk/Open-ILS/src/python/oils/utils/utils.py 2008-01-09 14:52:48 UTC (rev 8361)
@@ -49,7 +49,13 @@
o[x] = 1
return o.keys()
+def is_db_true(data):
+ ''' Returns true if the data provided matches what the database considers a true value '''
+ if not data or data == 'f' or str(data) == '0':
+ return False
+ return True
+
def login(username, password, type=None, workstation=None):
''' Login to the server and get back an authtoken'''
More information about the open-ils-commits
mailing list