Skip to content

Commit

Permalink
[#2767] Update the related controller to use a tuple for options
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jul 30, 2012
1 parent 07014a4 commit 52b658a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ckan/controllers/related.py
Expand Up @@ -116,13 +116,14 @@ def _edit_or_new(self, id, related_id, is_edit):
if is_edit:
data = related

c.types = {
"application": "Application",
"idea": "Idea",
"news_article": "News Article",
"paper": "Paper",
"visualization": "Visualization"
}
c.types = (
{"text": "Application", "value": "application"},
{"text": "Idea", "value": "idea"},
{"text": "News Article", "value": "news_article"},
{"text": "Paper", "value": "paper"},
{"text": "Visualization", "value": "visualization"}
)

c.pkg_id = id
vars = {'data': data, 'errors': errors, 'error_summary': error_summary}
c.form = base.render("related/edit_form.html", extra_vars=vars)
Expand Down

0 comments on commit 52b658a

Please sign in to comment.