Skip to content

Instantly share code, notes, and snippets.

@nickveenhof
Created January 31, 2013 11:04
Show Gist options
  • Save nickveenhof/4682162 to your computer and use it in GitHub Desktop.
Save nickveenhof/4682162 to your computer and use it in GitHub Desktop.
--- a/uuid_node/uuid_node.module
+++ b/uuid_node/uuid_node.module
@@ -10,7 +10,7 @@ function uuid_node_node_presave($node) {
$node->uuid = uuid_uuid();
}
- if (1 == $node->revision) {
+ if (isset($node->revision) && 1 == $node->revision) {
$node->vuuid = uuid_uuid();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment