mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17: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
|
|
@ -20,7 +20,7 @@ from django.conf import settings
|
|||
from django.core.exceptions import ObjectDoesNotExist
|
||||
|
||||
from src.typeclasses.models import TypedObject, NickHandler
|
||||
from src.objects.manager import ObjectManager
|
||||
from src.objects.manager import ObjectDBManager
|
||||
from src.players.models import PlayerDB
|
||||
from src.commands.cmdsethandler import CmdSetHandler
|
||||
from src.commands import cmdhandler
|
||||
|
|
@ -171,7 +171,7 @@ class ObjectDB(TypedObject):
|
|||
help_text="optional python path to a cmdset class.")
|
||||
|
||||
# Database manager
|
||||
objects = ObjectManager()
|
||||
objects = ObjectDBManager()
|
||||
|
||||
# caches for quick lookups of typeclass loading.
|
||||
_typeclass_paths = settings.OBJECT_TYPECLASS_PATHS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue