mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
Made several admin commands handle multi-word global searching; defined a new search function on objects.model for global name searching.
/Griatch
This commit is contained in:
parent
d8787bfc70
commit
9b6bd7125f
3 changed files with 40 additions and 31 deletions
|
|
@ -145,8 +145,9 @@ class ObjectManager(models.Manager):
|
|||
o_query = self.filter(name__iexact=ostring)
|
||||
else:
|
||||
o_query = self.filter(name__icontains=ostring)
|
||||
if limit_types:
|
||||
o_query = o_query.include(type__in=limit_types)
|
||||
if limit_types is not False:
|
||||
for limiter in limit_types:
|
||||
o_query.filter(type=limiter)
|
||||
return o_query.exclude(type__in=[defines_global.OTYPE_GARBAGE,
|
||||
defines_global.OTYPE_GOING])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue