Skip to content

Commit

Permalink
#2 change field names again
Browse files Browse the repository at this point in the history
  • Loading branch information
p-a-s-c-a-l committed Nov 7, 2018
1 parent abd030c commit 15aa2a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/scripts/services/drupalService.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ angular.module(
nodePath = '/node/:nodeId';
nodeFields = [];
//nodeFields['indicators'] = 'field_mcda_indicators'
nodeFields['indicators'] = 'field_indicators';
nodeFields['indicators'] = 'field_mcda_indicators';
nodeFields['criteriaFunction'] = 'field_mcda_criteria_function';
nodeFields['decisionStrategy'] = 'field_mcda_indicators';
nodeFields['decisionStrategy'] = 'field_mcda_decision_strategy';

// <editor-fold defaultstate="open" desc="=== drupalRestApi ===========================">
$this.drupalRestApi = {};
Expand Down Expand Up @@ -102,7 +102,7 @@ angular.module(

getObjectFromDrupalField = function(node, field) {
if (!node || node === null || node === undefined ||
!node.field_indicators || node[field] === null || node[field] === undefined) {
!node[field] || node[field] === null || node[field] === undefined) {
console.log('node object is null or field "' + field + '" is empty!');
return [];
} else {
Expand Down

0 comments on commit 15aa2a2

Please sign in to comment.