mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 02:36:32 +01:00
First version of OOBHandler put together. Might still have to rework it since it cannot properly handle multiple trackers tracking a single field on a given object.
This commit is contained in:
parent
4a5de04956
commit
d74cce4dfe
7 changed files with 293 additions and 288 deletions
|
|
@ -184,7 +184,7 @@ class _SaverSet(_SaverMutable, MutableSet):
|
|||
# serialization helpers
|
||||
#
|
||||
|
||||
def _pack_dbobj(item):
|
||||
def pack_dbobj(item):
|
||||
"""
|
||||
Check and convert django database objects to an internal representation.
|
||||
This either returns the original input item or a tuple ("__packed_dbobj__", key, creation_time, id)
|
||||
|
|
@ -241,7 +241,7 @@ def to_pickle(data):
|
|||
return item.__class__([process_item(val) for val in item])
|
||||
except (AttributeError, TypeError):
|
||||
return [process_item(val) for val in item]
|
||||
return _pack_dbobj(item)
|
||||
return pack_dbobj(item)
|
||||
return process_item(data)
|
||||
|
||||
@transaction.autocommit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue