0004-haystack-don-t-declare-a-file-storage-for-fake-initi.patch
hobo/multitenant/haystack.py | ||
---|---|---|
20 | 20 | |
21 | 21 |
from django.conf import settings |
22 | 22 |
from django.db import connection |
23 | ||
24 |
from tenant_schemas.postgresql_backend.base import FakeTenant |
|
25 | ||
23 | 26 |
import haystack.backends.whoosh_backend |
24 | 27 | |
25 | 28 |
class WhooshSearchBackend(haystack.backends.whoosh_backend.WhooshSearchBackend): |
29 |
@property |
|
30 |
def use_file_storage(self): |
|
31 |
tenant = connection.get_tenant() |
|
32 |
return not(isinstance(connection.tenant, FakeTenant)) |
|
33 | ||
34 |
@use_file_storage.setter |
|
35 |
def use_file_storage(self, value): |
|
36 |
pass |
|
37 | ||
26 | 38 |
@property |
27 | 39 |
def path(self): |
28 | 40 |
tenant = connection.get_tenant() |
29 |
- |