[Bps-public-commit] r17538 - sd/trunk/lib/App/SD/Model

jesse at bestpractical.com jesse at bestpractical.com
Fri Jan 2 19:52:54 EST 2009


Author: jesse
Date: Fri Jan  2 19:52:54 2009
New Revision: 17538

Modified:
   sd/trunk/lib/App/SD/Model/Comment.pm

Log:
Comment ticket comments on create. if htere's no content, don't create it

Modified: sd/trunk/lib/App/SD/Model/Comment.pm
==============================================================================
--- sd/trunk/lib/App/SD/Model/Comment.pm	(original)
+++ sd/trunk/lib/App/SD/Model/Comment.pm	Fri Jan  2 19:52:54 2009
@@ -10,6 +10,16 @@
 
 augment declared_props => sub {'content'};
 
+sub canonicalize_props {
+    my $self = shift;
+    my $props = shift;
+    $self->SUPER::canonicalize_props($props);
+
+    unless ($props->{content}) {
+        delete $props->{$_} for keys %$props;
+    }
+}
+
 
 #has SVK::Model::Ticket;
 



More information about the Bps-public-commit mailing list