]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/macros
Fix to check that a has_a points to another Model object.
[maypole.git] / templates / factory / macros
index e7396d3365d3732d568d494d6e3d5a469cba7042..4a90e1771f4f1ae9e2c60cb20a2ee009dfaca165 100644 (file)
@@ -34,7 +34,7 @@ command for that object. Otherwise, it just displays the data.
 
 [%
 MACRO maybe_link_view(object) BLOCK;
-    IF object.table; # It's an object, i.e. a has-a
+    IF object.isa('Maypole::Model::Base');
         link(object.table, "view", object.id.join('/'), object);
     ELSE;
         object;