Skip to content
This repository was archived by the owner on Jan 17, 2020. It is now read-only.

Use latest revision's title in all review actions - #96

Open
lehmannro wants to merge 3 commits into
EuroPython:developfrom
lehmannro:fix/ticket95
Open

lehmannro wants to merge 3 commits into
EuroPython:developfrom
lehmannro:fix/ticket95

Conversation

@lehmannro

Copy link
Copy Markdown

This hotfixes #95 and should replace all improper uses of the proposal's title with the latest proposal version's title.

A cleaner approach would be supplying a non-null template variable which points to the latest proposal, whether there were revisions or not, and just referring to that proposal's title. This would also clean up the whole {% if proposal_version %}{{ proposal_version.yadda }}{% else %}{{ proposal.yadda }}{% endif %} business all over the templates.

These commits go untested.

@MarkusH

MarkusH commented Mar 18, 2014

Copy link
Copy Markdown
Contributor

Nice idea to clean up the templates. However, I'd move the decision weather there is a proposal version or not, as a property to the reviews.Proposal model and either return the version or the proposal itself. This would clean up a lot of code in the views too.

Have a look at the ProposalVersionManager on how to get the latest version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

2 participants