mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 07:46:30 +01:00
Fixed a bug in comms' typeclass->dbobj conversion
This commit is contained in:
parent
2d75648eb1
commit
a4a50fdb87
2 changed files with 3 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ from django.db import models
|
|||
from django.db.models import Q
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
_GA = object.__getattribute__
|
||||
_PlayerDB = None
|
||||
_ObjectDB = None
|
||||
_Channel = None
|
||||
|
|
@ -58,7 +59,7 @@ def identify_object(inp):
|
|||
return inp, None
|
||||
# try to identify the type
|
||||
try:
|
||||
obj = inp.dbobj # this works for all typeclassed entities
|
||||
obj = _GA(inp, "dbobj") # this works for all typeclassed entities
|
||||
except AttributeError:
|
||||
obj = inp
|
||||
typ = type(obj)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ from src.utils.utils import is_iter, to_str, crop, make_iter
|
|||
|
||||
__all__ = ("Msg", "TempMsg", "Channel", "PlayerChannelConnection", "ExternalChannelConnection")
|
||||
|
||||
|
||||
#------------------------------------------------------------
|
||||
#
|
||||
# Msg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue