Skip to content

Commit

Permalink
Release 0.6.4.2
Browse files Browse the repository at this point in the history
- Fix logger handling to django default
- Fix is_list method of validators
- Fix validate method of SchemeValidator when many option is enabled
  • Loading branch information
bedilbek committed Mar 9, 2020
1 parent dbf2b07 commit 7b397a0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ integration support for <b>Python 3.6+</b> and <b>Django 2.0+</b>
</div>


| Version: | 0.6.4.1 |
| Version: | 0.6.4.2 |
|-----------|--------------------------------------------------------------------------------------------------------------------|
| Download: | https://pypi.org/project/django-quickbooks/ |
| Source: | https://github.com/weltlink/django-quickbooks/ |
Expand Down
9 changes: 4 additions & 5 deletions django_quickbooks/session_manager.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()

Expand All @@ -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

Expand Down
6 changes: 2 additions & 4 deletions django_quickbooks/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7b397a0

Please sign in to comment.