Skip to content

Commit 7b397a0

Browse files
committed
Release 0.6.4.2
- Fix logger handling to django default - Fix is_list method of validators - Fix validate method of SchemeValidator when many option is enabled
1 parent dbf2b07 commit 7b397a0

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.6.4.2] - 2020-03-09
6+
7+
### FIXED
8+
9+
- Fix logger handling to django default
10+
- Fix is_list method of validators
11+
- Fix validate method of SchemeValidator when many option is enabled
12+
513
## [0.6.4.1] - 2020-03-06
614

715
### FIXED
@@ -52,3 +60,4 @@ All notable changes to this project will be documented in this file.
5260
[0.6.3]: https://github.com/weltlink/django-quickbooks/compare/0.6...0.6.3
5361
[0.6.4]: https://github.com/weltlink/django-quickbooks/compare/0.6.3...0.6.4
5462
[0.6.4.1]: https://github.com/weltlink/django-quickbooks/compare/0.6.4...0.6.4.1
63+
[0.6.4.2]: https://github.com/weltlink/django-quickbooks/compare/0.6.4.1...0.6.4.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ integration support for <b>Python 3.6+</b> and <b>Django 2.0+</b>
1111
</div>
1212

1313

14-
| Version: | 0.6.4.1 |
14+
| Version: | 0.6.4.2 |
1515
|-----------|--------------------------------------------------------------------------------------------------------------------|
1616
| Download: | https://pypi.org/project/django-quickbooks/ |
1717
| Source: | https://github.com/weltlink/django-quickbooks/ |

django_quickbooks/session_manager.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import logging
22

3+
logger = logging.getLogger('django')
4+
35
from django.core.exceptions import ObjectDoesNotExist
46
from django.utils.decorators import method_decorator
57
from lxml import etree
@@ -37,10 +39,9 @@ def add_new_jobs(self, realm=None):
3739
try:
3840
self.publish_message(qb_task.get_request(), str(realm.id))
3941
except QbException as exc:
40-
logger = logging.getLogger('django.request')
4142
logger.error(exc.detail)
42-
except ObjectDoesNotExist:
43-
pass
43+
except ObjectDoesNotExist as e:
44+
logger.error(e)
4445

4546
queryset.delete()
4647

@@ -58,11 +59,9 @@ def process_response(self, ticket, response, hresult, message):
5859
break
5960

6061
except QBXMLParseError as exc:
61-
logger = logging.getLogger('django.request')
6262
logger.error(exc.detail)
6363
return -1
6464
except QBXMLStatusError as exc:
65-
logger = logging.getLogger('django.request')
6665
logger.error(exc.detail)
6766
return -1
6867

django_quickbooks/validators.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def operation_type(value):
2929

3030

3131
def is_list(value):
32-
if not isinstance(value, list):
33-
raise ValidationError(VALIDATION_MESSAGES[ValidationCode.INVALID_TYPE] % (type(value), str),
34-
ValidationCode.INVALID_TYPE)
32+
return isinstance(value, list)
3533

3634

3735
def str_type_validator(value):
@@ -127,7 +125,7 @@ def validate(self, field_name, value, **options):
127125
if many:
128126
for single_value in value:
129127
try:
130-
self.validate(single_value, **options)
128+
self.validate(field_name, single_value, **options)
131129
except ValidationError as exc:
132130
errors.append(exc.detail)
133131

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Bedilbek Khamidov'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '0.6.4.1'
25+
release = '0.6.4.2'
2626

2727

2828
# -- General configuration ---------------------------------------------------

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = django-quickbooks
3-
version = 0.6.4.1
3+
version = 0.6.4.2
44
description = A Django app to integrate with quickbooks.
55
url = https://github.com/weltlink/django-quickbooks
66
author = Bedilbek Khamidov

0 commit comments

Comments
 (0)