Skip to content

Commit dbf2b07

Browse files
committed
Release 0.6.4.1
- 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
1 parent 28d5101 commit dbf2b07

File tree

7 files changed

+42
-7
lines changed

7 files changed

+42
-7
lines changed

CHANGELOG.md

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

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

5+
## [0.6.4.1] - 2020-03-06
6+
7+
### FIXED
8+
9+
- Fix local_customer filtering by name
10+
- Fix setting tenant to conection instead of schema_name
11+
- Fix default REALM_CONNECTION_DECORATOR
12+
- Fix installation requirements of extra tenant package
13+
14+
515
## [0.6.4] - 2020-02-26
616

717
### ADDED
@@ -41,3 +51,4 @@ All notable changes to this project will be documented in this file.
4151
[0.6.0]: https://github.com/weltlink/django-quickbooks/compare/0.5...0.6
4252
[0.6.3]: https://github.com/weltlink/django-quickbooks/compare/0.6...0.6.3
4353
[0.6.4]: https://github.com/weltlink/django-quickbooks/compare/0.6.3...0.6.4
54+
[0.6.4.1]: https://github.com/weltlink/django-quickbooks/compare/0.6.4...0.6.4.1

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 |
14+
| Version: | 0.6.4.1 |
1515
|-----------|--------------------------------------------------------------------------------------------------------------------|
1616
| Download: | https://pypi.org/project/django-quickbooks/ |
1717
| Source: | https://github.com/weltlink/django-quickbooks/ |

django_quickbooks/decorators.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ def connect(realm, *args, **kwargs):
1717
def base_realm_tenant_connection(func):
1818
def connect(realm, *args, **kwargs):
1919
if hasattr(realm, 'schema_name') and hasattr(connection, 'set_schema'):
20-
connection.set_schema(realm.schema_name)
20+
try:
21+
from django_tenants.utils import get_tenant_model
22+
connection.set_tenant(get_tenant_model().objects.get(schema_name=realm.schema_name))
23+
except ImportError:
24+
raise ModuleNotFoundError(
25+
'django-tenants package is not installed: pip install django-quickbooks[tenant]'
26+
)
2127
return func(realm, *args, **kwargs)
2228

2329
return connect

django_quickbooks/processors/customer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def process(self, realm):
2020
local_customer = None
2121
if customer.ListID:
2222
local_customer = self.find_by_list_id(customer.ListID)
23-
elif not local_customer and customer.Name:
23+
if not local_customer and customer.Name:
2424
local_customer = self.find_by_name(customer.Name)
2525

2626
if local_customer:

django_quickbooks/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'REALM_SESSION_MODEL_CLASS': 'django_quickbooks.models.RealmSession',
1515
'QBD_TASK_MODEL_CLASS': 'django_quickbooks.models.QBDTask',
1616

17-
'REALM_CONNECTION_DECORATOR': 'django_quickbooks.decorators.base_realm_tenant_connection',
17+
'REALM_CONNECTION_DECORATOR': 'django_quickbooks.decorators.base_realm_connection',
1818

1919
'RESPONSE_PROCESSORS': (
2020
'django_quickbooks.processors.CustomerQueryResponseProcessor',

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'
25+
release = '0.6.4.1'
2626

2727

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

setup.cfg

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
[metadata]
22
name = django-quickbooks
3-
version = 0.6.4
3+
version = 0.6.4.1
44
description = A Django app to integrate with quickbooks.
55
url = https://github.com/weltlink/django-quickbooks
66
author = Bedilbek Khamidov
77
author_email = bedilbek@gmail.com
88
license = Mozilla Public License 2.0
9+
keywords =
10+
django
11+
django-quickbooks
12+
intuit
13+
quickbooks
14+
quickbooks-django
15+
quickbooks-desktop
16+
quickbooks-online
17+
quickbooks-web-connector
18+
qwc
19+
qb
20+
qbwc
21+
web-connector
22+
integration
23+
soap-server
24+
spyne
25+
lxml
26+
927
classifiers =
1028
Environment :: Web Environment
1129
Framework :: Django
@@ -34,4 +52,4 @@ install_requires =
3452
[options.extras_require]
3553
rabbit = pika>=1.1.0
3654
celery = celery==4.3.0
37-
tenant = django-tenant-schemas==1.10.0
55+
tenant = django-tenants==2.2.3

0 commit comments

Comments
 (0)