mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 15:07:16 +02:00
Continuing to clean up and fix bugs around Attribute/Tag
This commit is contained in:
parent
bad24513e0
commit
b1e08c7da6
5 changed files with 53 additions and 44 deletions
|
|
@ -533,8 +533,10 @@ class TagHandler(object):
|
|||
def add(self, tag, category=None, data=None):
|
||||
"Add a new tag to the handler. Tag is a string or a list of strings."
|
||||
for tagstr in make_iter(tag):
|
||||
tagstr = tagstr.strip().lower() if tagstr is not None else None
|
||||
category = category().lower() if category is not None else None
|
||||
if not tagstr:
|
||||
continue
|
||||
tagstr = tagstr.strip().lower()
|
||||
category = category.strip().lower() if category is not None else None
|
||||
data = str(data) if data is not None else None
|
||||
# this will only create tag if no matches existed beforehand (it
|
||||
# will overload data on an existing tag since that is not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue