Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1797,webstore][s]: read actually looks up resource.
- Loading branch information
1 parent
91c0744
commit 3c7238b
Showing
2 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
from ckan.lib.base import BaseController | ||
import ckan.model as model | ||
|
||
class WebstoreController(BaseController): | ||
def data(self, id): | ||
return '' | ||
resource = model.Session.query(model.Resource).get(id) | ||
if not resource: | ||
abort(404) | ||
return resource.id | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters