[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. 5155ba49ee70ab2a7fdd4b0f82d93a0b9735afb9

jesse jesse at bestpractical.com
Mon Jan 19 11:31:17 EST 2009


The branch, master has been updated
       via  5155ba49ee70ab2a7fdd4b0f82d93a0b9735afb9 (commit)
      from  01f641f375286a18a95f17032453461593b58f32 (commit)

Summary of changes:
 lib/Prophet/Server/View.pm |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 5155ba49ee70ab2a7fdd4b0f82d93a0b9735afb9
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Jan 19 11:30:23 2009 -0500

    Now canonicalize canonicalizable props in the webui for new records
    
    (not just existing ones)

diff --git a/lib/Prophet/Server/View.pm b/lib/Prophet/Server/View.pm
index fc6301f..46d035b 100644
--- a/lib/Prophet/Server/View.pm
+++ b/lib/Prophet/Server/View.pm
@@ -51,15 +51,15 @@ template '_prophet_autocompleter' => sub {
         uuid       => $self->cgi->param('uuid'),
         app_handle => $self->app_handle
     );
-
     my @possible;
-    if ( $obj->loaded ) {
+    if ( $obj) {
         my $canon = { $args{prop} => $args{q} };
         $obj->canonicalize_prop( $args{'prop'}, $canon, {} );
         if ( $canon->{ $args{prop} } ne $args{q} ) {
             push @possible, $canon->{ $args{'prop'} };
         }
-
+    }
+    if ( $obj->loaded ) {
         push @possible, $obj->prop( $args{'prop'} );
     } else {
         my $params = { $args{'prop'} => undef };

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list