Skip to content

Commit

Permalink
SC.SingleAttribute (to-one relationships) should respect the isEditab…
Browse files Browse the repository at this point in the history
…le property.
  • Loading branch information
Tom Dale authored and Juan Pinzon committed Aug 24, 2010
1 parent 7f4042f commit e551261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frameworks/datastore/models/single_attribute.js
Expand Up @@ -56,7 +56,7 @@ SC.SingleAttribute = SC.RecordAttribute.extend(
inverseKey, isMaster, oldRec, attr, ret, nvalue;

// WRITE
if (newRec !== undefined) {
if (newRec !== undefined && this.get('isEditable')) {

// can only take other records or null
if (newRec && !SC.kindOf(newRec, SC.Record)) {
Expand Down

0 comments on commit e551261

Please sign in to comment.