Skip to content

Commit

Permalink
Release 0.6.4.1
Browse files Browse the repository at this point in the history
- Fix local_customer filtering by name
- Fix setting tenant to connection instead of schema_name
- Fix default REALM_CONNECTION_DECORATOR
- Fix installation requirements of extra tenant package
  • Loading branch information
bedilbek committed Mar 6, 2020
1 parent 28d5101 commit dbf2b07
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

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

## [0.6.4.1] - 2020-03-06

### FIXED

- Fix local_customer filtering by name
- Fix setting tenant to conection instead of schema_name
- Fix default REALM_CONNECTION_DECORATOR
- Fix installation requirements of extra tenant package


## [0.6.4] - 2020-02-26

### ADDED
Expand Down Expand Up @@ -41,3 +51,4 @@ All notable changes to this project will be documented in this file.
[0.6.0]: https://github.com/weltlink/django-quickbooks/compare/0.5...0.6
[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
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 |
| Version: | 0.6.4.1 |
|-----------|--------------------------------------------------------------------------------------------------------------------|
| Download: | https://pypi.org/project/django-quickbooks/ |
| Source: | https://github.com/weltlink/django-quickbooks/ |
Expand Down
8 changes: 7 additions & 1 deletion django_quickbooks/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ def connect(realm, *args, **kwargs):
def base_realm_tenant_connection(func):
def connect(realm, *args, **kwargs):
if hasattr(realm, 'schema_name') and hasattr(connection, 'set_schema'):
connection.set_schema(realm.schema_name)
try:
from django_tenants.utils import get_tenant_model
connection.set_tenant(get_tenant_model().objects.get(schema_name=realm.schema_name))
except ImportError:
raise ModuleNotFoundError(
'django-tenants package is not installed: pip install django-quickbooks[tenant]'
)
return func(realm, *args, **kwargs)

return connect
2 changes: 1 addition & 1 deletion django_quickbooks/processors/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def process(self, realm):
local_customer = None
if customer.ListID:
local_customer = self.find_by_list_id(customer.ListID)
elif not local_customer and customer.Name:
if not local_customer and customer.Name:
local_customer = self.find_by_name(customer.Name)

if local_customer:
Expand Down
2 changes: 1 addition & 1 deletion django_quickbooks/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'REALM_SESSION_MODEL_CLASS': 'django_quickbooks.models.RealmSession',
'QBD_TASK_MODEL_CLASS': 'django_quickbooks.models.QBDTask',

'REALM_CONNECTION_DECORATOR': 'django_quickbooks.decorators.base_realm_tenant_connection',
'REALM_CONNECTION_DECORATOR': 'django_quickbooks.decorators.base_realm_connection',

'RESPONSE_PROCESSORS': (
'django_quickbooks.processors.CustomerQueryResponseProcessor',
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'
release = '0.6.4.1'


# -- General configuration ---------------------------------------------------
Expand Down
22 changes: 20 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
[metadata]
name = django-quickbooks
version = 0.6.4
version = 0.6.4.1
description = A Django app to integrate with quickbooks.
url = https://github.com/weltlink/django-quickbooks
author = Bedilbek Khamidov
author_email = [email protected]
license = Mozilla Public License 2.0
keywords =
django
django-quickbooks
intuit
quickbooks
quickbooks-django
quickbooks-desktop
quickbooks-online
quickbooks-web-connector
qwc
qb
qbwc
web-connector
integration
soap-server
spyne
lxml

classifiers =
Environment :: Web Environment
Framework :: Django
Expand Down Expand Up @@ -34,4 +52,4 @@ install_requires =
[options.extras_require]
rabbit = pika>=1.1.0
celery = celery==4.3.0
tenant = django-tenant-schemas==1.10.0
tenant = django-tenants==2.2.3

0 comments on commit dbf2b07

Please sign in to comment.