mirror of
https://github.com/evennia/evennia.git
synced 2026-03-20 06:46:31 +01:00
Updating to make unittests work
This commit is contained in:
parent
f3af089aac
commit
cfd2f111f1
3 changed files with 12 additions and 3 deletions
|
|
@ -128,11 +128,20 @@ class Attribute(WeakSharedMemoryModel):
|
|||
key = property(lambda self: self.db_key)
|
||||
strvalue = property(lambda self: self.db_strvalue)
|
||||
category = property(lambda self: self.db_category)
|
||||
lock_storage = property(lambda self: self.db_lockstorage)
|
||||
model = property(lambda self: self.db_model)
|
||||
attrtype = property(lambda self: self.db_attrtype)
|
||||
date_created = property(lambda self: self.db_date_created)
|
||||
|
||||
def __lock_storage_get(self):
|
||||
return self.db_lock_storage
|
||||
def __lock_storage_set(self, value):
|
||||
self.db_lock_storage = value
|
||||
self.save(update_fields=["db_lock_storage"])
|
||||
def __lock_storage_del(self):
|
||||
self.db_lock_storage = ""
|
||||
self.save(update_fields=["db_lock_storage"])
|
||||
lock_storage = property(__lock_storage_get, __lock_storage_set, __lock_storage_del)
|
||||
|
||||
# Wrapper properties to easily set database fields. These are
|
||||
# @property decorators that allows to access these fields using
|
||||
# normal python operations (without having to remember to save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue