feat: Add quoting parameter in the UnicodeWriter constructor (#12578)
* Add quoting parameter in the constructor * fix: Use quoting kwarg to pass quoting value Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
parent
ee1806828f
commit
662f409604
1 changed files with 2 additions and 2 deletions
|
|
@ -107,10 +107,10 @@ def build_csv_response(data, filename):
|
|||
frappe.response["type"] = "csv"
|
||||
|
||||
class UnicodeWriter:
|
||||
def __init__(self, encoding="utf-8"):
|
||||
def __init__(self, encoding="utf-8", quoting=csv.QUOTE_NONNUMERIC):
|
||||
self.encoding = encoding
|
||||
self.queue = StringIO()
|
||||
self.writer = csv.writer(self.queue, quoting=csv.QUOTE_NONNUMERIC)
|
||||
self.writer = csv.writer(self.queue, quoting=quoting)
|
||||
|
||||
def writerow(self, row):
|
||||
if six.PY2:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue