From: Moritz Bunkus Date: Wed, 28 Jan 2015 14:42:58 +0000 (+0100) Subject: Pflichtenhefte: Fehler beim Anlegen von Versionen richtig abfangen X-Git-Tag: release-3.2.0~22 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1f024d692e4c03fca4747a9a224ef8587c6b9819;p=kivitendo-erp.git Pflichtenhefte: Fehler beim Anlegen von Versionen richtig abfangen --- diff --git a/SL/Controller/RequirementSpecVersion.pm b/SL/Controller/RequirementSpecVersion.pm index eab34d64e..e97d2252b 100644 --- a/SL/Controller/RequirementSpecVersion.pm +++ b/SL/Controller/RequirementSpecVersion.pm @@ -72,13 +72,14 @@ sub action_create { return $self->js->error(@errors)->render($self) if @errors; my $db = $self->requirement_spec->db; - my @result = $self->version($self->requirement_spec->create_version(%attributes)); + my @result = $self->requirement_spec->create_version(%attributes); if (!@result) { $::lxdebug->message(LXDebug::WARN(), "Error: " . $db->error); return $self->js->error($::locale->text('Saving failed. Error message from the database: #1'), $db->error)->render($self); } + $self->version($result[0]); my $version_info_html = $self->render('requirement_spec/_version', { output => 0 }, requirement_spec => $self->requirement_spec); my $version_list_html = $self->render('requirement_spec_version/list', { output => 0 });