Browse Source

HUE-2166 [core] Oracle database support in doc model

Defer large fields for oracle support
Abraham Elmahrek 11 years ago
parent
commit
2237563581
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/core/src/desktop/models.py

+ 1 - 1
desktop/core/src/desktop/models.py

@@ -165,7 +165,7 @@ class DocumentTag(models.Model):
 class DocumentManager(models.Manager):
 
   def documents(self, user):
-    return Document.objects.filter(Q(owner=user) | Q(documentpermission__users=user) | Q(documentpermission__groups__in=user.groups.all())).distinct()
+    return Document.objects.filter(Q(owner=user) | Q(documentpermission__users=user) | Q(documentpermission__groups__in=user.groups.all())).defer('description', 'extra').distinct()
 
   def get_docs(self, user, model_class=None, extra=None):
     docs = Document.objects.documents(user).exclude(name='pig-app-hue-script')