Fixed a crash when submitting a new code review and no full rights.

This commit is contained in:
Loic d'Anterroches 2009-01-30 23:28:18 +01:00
parent 8f7ec57213
commit 01b68978ff

View File

@ -169,6 +169,9 @@ class IDF_Form_ReviewCreate extends Pluf_Form
$review->project = $this->project; $review->project = $this->project;
$review->summary = $this->cleaned_data['summary']; $review->summary = $this->cleaned_data['summary'];
$review->submitter = $this->user; $review->submitter = $this->user;
if (!isset($this->cleaned_data['status'])) {
$this->cleaned_data['status'] = 'New';
}
$review->status = IDF_Tag::add(trim($this->cleaned_data['status']), $this->project, 'Status'); $review->status = IDF_Tag::add(trim($this->cleaned_data['status']), $this->project, 'Status');
$review->create(); $review->create();
// add the first patch // add the first patch