Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ec1c7af2
Commit
ec1c7af2
authored
Mar 25, 1999
by
Jeffrey Shell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if type was 'nb' and optional was set, ValueError was still being
raised. fixed to return null
parent
bc3a8a80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
lib/python/Shared/DC/ZRDB/sqlvar.py
lib/python/Shared/DC/ZRDB/sqlvar.py
+7
-4
No files found.
lib/python/Shared/DC/ZRDB/sqlvar.py
View file @
ec1c7af2
...
...
@@ -119,7 +119,7 @@
however, if x is ommitted or an empty string, then the value
inserted is 'null'.
'''
__rcs_id__
=
'$Id: sqlvar.py,v 1.
6 1999/03/10 00:15:44 klm
Exp $'
__rcs_id__
=
'$Id: sqlvar.py,v 1.
7 1999/03/25 13:31:04 jeffrey
Exp $'
############################################################################
# Copyright
...
...
@@ -129,7 +129,7 @@ __rcs_id__='$Id: sqlvar.py,v 1.6 1999/03/10 00:15:44 klm Exp $'
# rights reserved.
#
############################################################################
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
from
DocumentTemplate.DT_Util
import
ParseError
,
parse_params
,
name_param
from
string
import
find
,
split
,
join
,
atoi
,
atof
...
...
@@ -188,8 +188,11 @@ class SQLVar:
else
:
v
=
str
(
v
)
if
not
v
and
t
==
'nb'
:
raise
ValueError
,
(
'Invalid empty string value for <em>%s</em>'
%
name
)
if
args
.
has_key
(
'optional'
)
and
args
[
'optional'
]:
return
'null'
else
:
raise
ValueError
,
(
'Invalid empty string value for <em>%s</em>'
%
name
)
v
=
md
.
getitem
(
'sql_quote__'
,
0
)(
v
)
#if find(v,"\'") >= 0: v=join(split(v,"\'"),"''")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment