mirror of
https://github.com/evennia/evennia.git
synced 2026-03-31 04:57:16 +02:00
Disallow re-naming and re-aliasing duplicates.
This commit is contained in:
parent
899136760e
commit
65d8ac8bdc
2 changed files with 11 additions and 6 deletions
|
|
@ -793,7 +793,7 @@ class Object(models.Model):
|
|||
self.script_parent = parent_str.strip()
|
||||
self.save()
|
||||
|
||||
def get_attribute_value(self, attrib, default=False):
|
||||
def get_attribute_value(self, attrib, default=None):
|
||||
"""
|
||||
Returns the value of an attribute on an object. You may need to
|
||||
type cast the returned value from this function!
|
||||
|
|
@ -804,10 +804,7 @@ class Object(models.Model):
|
|||
attrib = Attribute.objects.filter(attr_object=self).filter(attr_name=attrib)
|
||||
return attrib[0].attr_value
|
||||
else:
|
||||
if default:
|
||||
return default
|
||||
else:
|
||||
return False
|
||||
return default
|
||||
|
||||
def get_attribute_obj(self, attrib):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue