Fixed correct and separate handling of database model bases as compared to its proxy classes using different managers for each type (e.g. ObjectDB.objects.all() will return all ObjectDB instances(including proxy instances) whereas Object.objects.all() will only return Objects)

This commit is contained in:
Griatch 2014-12-22 08:54:53 +01:00
parent 554d1b9834
commit 2ee9e62336
15 changed files with 105 additions and 79 deletions

View file

@ -11,6 +11,7 @@ from django.conf import settings
from src.typeclasses.models import TypeclassBase
from django.utils.translation import ugettext as _
from src.scripts.models import ScriptDB
from src.scripts.manager import ScriptManager
from src.comms import channelhandler
from src.utils import logger
@ -114,6 +115,7 @@ class ScriptBase(ScriptDB):
from the class 'Script' instead.
"""
__metaclass__ = TypeclassBase
objects = ScriptManager()
def __eq__(self, other):
"""