[Bps-public-commit] App-Changeloggr branch, master, updated. 0e88a7742479e592a8934449abe4456d76656522
sartak at bestpractical.com
sartak at bestpractical.com
Mon Jul 27 14:57:06 EDT 2009
The branch, master has been updated
via 0e88a7742479e592a8934449abe4456d76656522 (commit)
from d7d2d0afd76806c04ff4291dd436e5c7e6728d65 (commit)
Summary of changes:
lib/App/Changeloggr/Model/Changelog.pm | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 0e88a7742479e592a8934449abe4456d76656522
Author: Shawn M Moore <sartak at gmail.com>
Date: Mon Jul 27 14:56:46 2009 -0400
Fix a bug where creating a changelog would flash a uniqueness warning
diff --git a/lib/App/Changeloggr/Model/Changelog.pm b/lib/App/Changeloggr/Model/Changelog.pm
index 1e9aaa2..dfe21dc 100644
--- a/lib/App/Changeloggr/Model/Changelog.pm
+++ b/lib/App/Changeloggr/Model/Changelog.pm
@@ -50,8 +50,9 @@ sub validate_name {
my $self = shift;
my $name = shift;
my $exist = M(Changelog => name => $name);
+
return (0, "That name already exists -- choose another")
- if $exist->id && $exist->id != $self->id;
+ if $self->id && $exist->id && $exist->id != $self->id;
return 1;
}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list