mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 20:47:17 +02:00
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:
parent
554d1b9834
commit
2ee9e62336
15 changed files with 105 additions and 79 deletions
|
|
@ -28,7 +28,7 @@ from django.conf import settings
|
|||
from django.db import models
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from src.typeclasses.models import TypedObject
|
||||
from src.scripts.manager import ScriptManager
|
||||
from src.scripts.manager import ScriptDBManager
|
||||
from src.utils.utils import dbref, to_str
|
||||
|
||||
__all__ = ("ScriptDB",)
|
||||
|
|
@ -98,7 +98,7 @@ class ScriptDB(TypedObject):
|
|||
db_is_active = models.BooleanField('script active', default=False)
|
||||
|
||||
# Database manager
|
||||
objects = ScriptManager()
|
||||
objects = ScriptDBManager()
|
||||
|
||||
# caches for quick lookups
|
||||
_typeclass_paths = settings.SCRIPT_TYPECLASS_PATHS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue