Index: nat.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nat/nat.module,v
retrieving revision 1.14.2.19
diff -u -r1.14.2.19 nat.module
--- nat.module	14 Aug 2007 16:36:40 -0000	1.14.2.19
+++ nat.module	2 Dec 2007 18:46:55 -0000
@@ -102,9 +106,17 @@
       // Copying over the node body is optional.
       $body = isset($nat_config['body'][$node->type]) ? $body : '';
 
-      // Update node title in term(s).
-      $terms = nat_get_terms($node->nid);
-      _nat_update_terms($terms, $node->title, $body, $node->taxonomy, $node->nat['related'], $node->nat['synonyms']);
+      // Update node title in term(s) or add terms if they don't exist.
+      if ($terms = nat_get_terms($node->nid)) {
+        _nat_update_terms($terms, $node->title, $body, $node->taxonomy, $node->nat['related'], $node->nat['synonyms']);
+      }
+      else {
+        // Add node title as terms.
+        $terms = _nat_add_terms($nat_config['types'][$node->type], $node->title, $body, $node->taxonomy, $node->nat['related'], $node->nat['synonyms']);
+
+        // Save node-term association in the NAT table.
+        _nat_save_association($node->nid, $terms);
+      }
       break;
     case 'delete':
       // Deleting the associated term when a node is deleted is optional.
