|
a/Allura/allura/model/index.py |
|
b/Allura/allura/model/index.py |
|
... |
|
... |
147 |
result = {}
|
147 |
result = {}
|
148 |
for link, d in parsed_links.iteritems():
|
148 |
for link, d in parsed_links.iteritems():
|
149 |
matches = matches_by_artifact.get(d['artifact'], [])
|
149 |
matches = matches_by_artifact.get(d['artifact'], [])
|
150 |
matches = (
|
150 |
matches = (
|
151 |
m for m in matches
|
151 |
m for m in matches
|
152 |
if m.project.shortname == d['project'] and m.project.neighborhood_id == d['nbhd'] and m.app_config is not None)
|
152 |
if m.project.shortname == d['project'] and
|
|
|
153 |
m.project.neighborhood_id == d['nbhd'] and
|
|
|
154 |
m.app_config is not None and
|
|
|
155 |
m.project.app_instance(m.app_config.options.mount_point))
|
153 |
if d['app']:
|
156 |
if d['app']:
|
154 |
matches = (
|
157 |
matches = (
|
155 |
m for m in matches
|
158 |
m for m in matches
|
156 |
if m.app_config.options.mount_point == d['app'])
|
159 |
if m.app_config.options.mount_point == d['app'])
|
157 |
matches = list(matches)
|
160 |
matches = list(matches)
|
|
... |
|
... |
180 |
if hasattr(c, 'project'):
|
183 |
if hasattr(c, 'project'):
|
181 |
p_shortname = getattr(c.project, 'shortname', None)
|
184 |
p_shortname = getattr(c.project, 'shortname', None)
|
182 |
p_id = getattr(c.project, '_id', None)
|
185 |
p_id = getattr(c.project, '_id', None)
|
183 |
p_nbhd = c.project.neighborhood_id
|
186 |
p_nbhd = c.project.neighborhood_id
|
184 |
if len(parts) == 3:
|
187 |
if len(parts) == 3:
|
185 |
p_id = Project.query.get(shortname=parts[0])
|
188 |
p_id = Project.query.get(shortname=parts[0], neighborhood_id=p_nbhd)._id
|
186 |
return dict(
|
189 |
return dict(
|
187 |
nbhd=p_nbhd,
|
190 |
nbhd=p_nbhd,
|
188 |
project=parts[0],
|
191 |
project=parts[0],
|
189 |
project_id=p_id,
|
192 |
project_id=p_id,
|
190 |
app=parts[1],
|
193 |
app=parts[1],
|