summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/callbacks.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/callbacks.inc b/modules/callbacks.inc
index 0c5c8ee..ee156ab 100644
--- a/modules/callbacks.inc
+++ b/modules/callbacks.inc
@@ -673,7 +673,7 @@ function entity_metadata_no_hook_node_access($op, $node = NULL, $account = NULL)
if (empty($node->vid) && in_array($op, array('create', 'update'))) {
// This is a new node or the original node.
if (isset($node->type)) {
- $op = !empty($node->is_new) && $node->is_new ? 'create' : 'update';
+ $op = empty($node->nid) || !empty($node->is_new) ? 'create' : 'update';
return node_access($op, $op == 'create' ? $node->type : $node, $account);
}
else {