Skip to content

Commit

Permalink
fixed issue in search that was caused by an overwritten variable
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Sep 11, 2012
1 parent e544ef9 commit 4eb4222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/datastore/logic/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def datastore_search(context, data_dict):
alias_sql = text(u'select alias_of from "_table_metadata" where name = :id')
result = db._get_engine(None, data_dict).execute(alias_sql, id=res_id).fetchone()
if result:
alias_exists = [True for res_id in [x.strip('"') for x in result[0]]
if model.Resource.get(res_id)]
alias_exists = [True for res in [x.strip('"') for x in result[0]]
if model.Resource.get(res)]

if not (res_exists or alias_exists or res_id=='_table_metadata'):
raise p.toolkit.ObjectNotFound(p.toolkit._(
Expand Down

0 comments on commit 4eb4222

Please sign in to comment.