0001-postgresql_backend-clear-_cache-on-current-ContentTy.patch
tenant_schemas/postgresql_backend/base.py | ||
---|---|---|
205 | 205 |
ContentTypeManager_old__init__(self, *args, **kwargs) |
206 | 206 |
if '_cache' in self.__dict__: |
207 | 207 |
del self._cache |
208 | ||
208 | 209 |
ContentTypeManager.__init__ = ContentTypeManager_new__init__ |
209 | 210 | |
211 |
if '_cache' in ContentType.objects.__dict__: |
|
212 |
del ContentType.objects._cache |
|
213 | ||
210 | 214 |
if hasattr(ContentType._meta, 'local_managers'): |
211 | 215 |
for manager in ContentType._meta.local_managers: |
212 | 216 |
if '_cache' in manager.__dict__: |
213 |
- |