Skip to content

Commit 6f53c30

Browse files
Simplify code.
1 parent 9fcce6e commit 6f53c30

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/oracledb/impl/thin/var.pyx

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -73,10 +73,7 @@ cdef class ThinVarImpl(BaseVarImpl):
7373
if value is not None \
7474
and not isinstance(value, (PY_TYPE_LOB,
7575
PY_TYPE_ASYNC_LOB)):
76-
lob = conn.createlob(metadata.dbtype)
77-
if value:
78-
lob.write(value)
79-
self._values[idx] = lob
76+
self._values[idx] = conn.createlob(metadata.dbtype, value)
8077

8178
# bind by name
8279
if name is not None:

0 commit comments

Comments
 (0)