apostrophe-schemas
Advanced tools
Comparing version 0.5.42 to 0.5.43
{ | ||
"version": "0.5.42", | ||
"version": "0.5.43", | ||
"name": "apostrophe-schemas", | ||
@@ -4,0 +4,0 @@ "description": "Schemas for easy editing of properties in Apostrophe objects", |
@@ -273,5 +273,5 @@ function AposSchemas() { | ||
var info = $field.selective('get', { incomplete: true }); | ||
if (field.relationshipField) { | ||
if (field.relationshipsField) { | ||
data[field.idsField] = _.pluck(info, 'value'); | ||
data[field.relationshipField] = {}; | ||
data[field.relationshipsField] = {}; | ||
var relationship = {}; | ||
@@ -281,3 +281,3 @@ _.each(info, function(e) { | ||
}); | ||
data[field.relationshipField] = relationship; | ||
data[field.relationshipsField] = relationship; | ||
} else { | ||
@@ -590,3 +590,3 @@ data[field.idsField] = info; | ||
// that queries the server and then merges in the relationship fields. | ||
if (field.relationshipField) { | ||
if (field.relationshipsField) { | ||
var url = autocomplete; | ||
@@ -598,3 +598,3 @@ autocomplete = function(req, callback) { | ||
_.each(results, function(result) { | ||
var relationship = data[field.relationshipField] && data[field.relationshipField][result.value]; | ||
var relationship = data[field.relationshipsField] && data[field.relationshipsField][result.value]; | ||
if (relationship) { | ||
@@ -601,0 +601,0 @@ _.extend(result, relationship); |
103566