[open-ils-commits] r8362 -
branches/acq-experiment/Open-ILS/src/python/oils/utils
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 9 10:19:13 EST 2008
Author: erickson
Date: 2008-01-09 09:54:40 -0500 (Wed, 09 Jan 2008)
New Revision: 8362
Modified:
branches/acq-experiment/Open-ILS/src/python/oils/utils/utils.py
Log:
added an is_true function
Modified: branches/acq-experiment/Open-ILS/src/python/oils/utils/utils.py
===================================================================
--- branches/acq-experiment/Open-ILS/src/python/oils/utils/utils.py 2008-01-09 14:52:48 UTC (rev 8361)
+++ branches/acq-experiment/Open-ILS/src/python/oils/utils/utils.py 2008-01-09 14:54:40 UTC (rev 8362)
@@ -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