Lines 112-118
def resolve(self, token, base):
|
Link Here
|
---|
|
112 |
values = [values, ] |
112 |
values = [values, ] |
113 |
for value in values: |
113 |
for value in values: |
114 |
new_base = admin.get_object(token.attrs['module'], value) |
114 |
new_base = admin.get_object(token.attrs['module'], value) |
115 |
token.objects.append(new_base) |
115 |
if new_base: |
|
|
116 |
token.objects.append(new_base) |
116 |
|
117 |
|
117 |
def query(self, token, base): |
118 |
def query(self, token, base): |
118 |
if 'module' in token.attrs: |
119 |
if 'module' in token.attrs: |
Lines 135-140
def _query_recursive(self, objects, attr, module, filter=None, regex=None):
|
Link Here
|
---|
|
135 |
_objs = [] |
136 |
_objs = [] |
136 |
for dn in objects: |
137 |
for dn in objects: |
137 |
obj = admin.get_object(module, dn) |
138 |
obj = admin.get_object(module, dn) |
|
|
139 |
if not obj: |
140 |
continue |
138 |
if not filter and not regex: |
141 |
if not filter and not regex: |
139 |
_objs.append(obj) |
142 |
_objs.append(obj) |
140 |
elif filter and obj.has_key(filter[0]) and obj[filter[0]] and fnmatch.fnmatch(obj[filter[0]], filter[1]): |
143 |
elif filter and obj.has_key(filter[0]) and obj[filter[0]] and fnmatch.fnmatch(obj[filter[0]], filter[1]): |