diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0c8470c..cd4e66f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
+## [0.6.4.2] - 2020-03-09
+
+### FIXED
+
+- Fix logger handling to django default
+- Fix is_list method of validators
+- Fix validate method of SchemeValidator when many option is enabled
+
## [0.6.4.1] - 2020-03-06
### FIXED
@@ -52,3 +60,4 @@ All notable changes to this project will be documented in this file.
[0.6.3]: https://github.com/weltlink/django-quickbooks/compare/0.6...0.6.3
[0.6.4]: https://github.com/weltlink/django-quickbooks/compare/0.6.3...0.6.4
[0.6.4.1]: https://github.com/weltlink/django-quickbooks/compare/0.6.4...0.6.4.1
+[0.6.4.2]: https://github.com/weltlink/django-quickbooks/compare/0.6.4.1...0.6.4.2
diff --git a/README.md b/README.md
index 5b0b38c..9be826d 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ integration support for Python 3.6+ and Django 2.0+
-| Version: | 0.6.4.1 |
+| Version: | 0.6.4.2 |
|-----------|--------------------------------------------------------------------------------------------------------------------|
| Download: | https://pypi.org/project/django-quickbooks/ |
| Source: | https://github.com/weltlink/django-quickbooks/ |
diff --git a/django_quickbooks/session_manager.py b/django_quickbooks/session_manager.py
index 7c68e83..9b55bb5 100644
--- a/django_quickbooks/session_manager.py
+++ b/django_quickbooks/session_manager.py
@@ -1,5 +1,7 @@
import logging
+logger = logging.getLogger('django')
+
from django.core.exceptions import ObjectDoesNotExist
from django.utils.decorators import method_decorator
from lxml import etree
@@ -37,10 +39,9 @@ def add_new_jobs(self, realm=None):
try:
self.publish_message(qb_task.get_request(), str(realm.id))
except QbException as exc:
- logger = logging.getLogger('django.request')
logger.error(exc.detail)
- except ObjectDoesNotExist:
- pass
+ except ObjectDoesNotExist as e:
+ logger.error(e)
queryset.delete()
@@ -58,11 +59,9 @@ def process_response(self, ticket, response, hresult, message):
break
except QBXMLParseError as exc:
- logger = logging.getLogger('django.request')
logger.error(exc.detail)
return -1
except QBXMLStatusError as exc:
- logger = logging.getLogger('django.request')
logger.error(exc.detail)
return -1
diff --git a/django_quickbooks/validators.py b/django_quickbooks/validators.py
index 160ccbd..33dbc67 100644
--- a/django_quickbooks/validators.py
+++ b/django_quickbooks/validators.py
@@ -29,9 +29,7 @@ def operation_type(value):
def is_list(value):
- if not isinstance(value, list):
- raise ValidationError(VALIDATION_MESSAGES[ValidationCode.INVALID_TYPE] % (type(value), str),
- ValidationCode.INVALID_TYPE)
+ return isinstance(value, list)
def str_type_validator(value):
@@ -127,7 +125,7 @@ def validate(self, field_name, value, **options):
if many:
for single_value in value:
try:
- self.validate(single_value, **options)
+ self.validate(field_name, single_value, **options)
except ValidationError as exc:
errors.append(exc.detail)
diff --git a/docs/source/conf.py b/docs/source/conf.py
index dd1dcfd..86c0ab5 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -22,7 +22,7 @@
author = 'Bedilbek Khamidov'
# The full version, including alpha/beta/rc tags
-release = '0.6.4.1'
+release = '0.6.4.2'
# -- General configuration ---------------------------------------------------
diff --git a/setup.cfg b/setup.cfg
index 0468692..8e0374d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = django-quickbooks
-version = 0.6.4.1
+version = 0.6.4.2
description = A Django app to integrate with quickbooks.
url = https://github.com/weltlink/django-quickbooks
author = Bedilbek Khamidov