Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion portiaui/app/services/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export default Ember.Service.extend({
const newId = json.data.id;

// Update internal store with internal model
const recordMap = store.typeMapFor(internalModel.type).idToRecord;
const recordMap = store._recordMapFor(internalModel.type.modelName).idToRecord;
delete recordMap[internalModel.id];
recordMap[newId] = internalModel;

Expand Down
2 changes: 1 addition & 1 deletion portiaui/app/services/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default DS.Store.extend({
didSaveRecord(internalModel, dataArg) {
// update record id if data has different id
// TODO: support rollback of id change
const recordMap = this.typeMapFor(internalModel.type).idToRecord;
const recordMap = this._recordMapFor(internalModel.type.modelName).idToRecord;
if (internalModel.id !== null && !(internalModel.id in recordMap)) {
for (let id of Object.keys(recordMap)) {
if (recordMap[id] === internalModel) {
Expand Down
2 changes: 1 addition & 1 deletion portiaui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-concurrency": "0.7.10",
"ember-data": "~2.11.3",
"ember-data": "^2.12.0",
"ember-data-url-templates": "0.1.1",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
Expand Down