Jelajahi Sumber

REST services: fixed issue with returned external keys

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2594 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 tahun lalu
induk
melakukan
cebaac2f51
2 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 0
      core/restservices.class.inc.php
  2. 0 1
      webservices/itoprest.examples.php

+ 5 - 0
core/restservices.class.inc.php

@@ -99,8 +99,13 @@ class ObjectResult
 					$value[] = $aLnkValues;
 				}
 			}
+			elseif ($oAttDef->IsExternalKey())
+			{
+				$value = $oObject->Get($sAttCode);
+			}
 			else
 			{
+				// Still to be refined...
 				$value = $oObject->GetEditValue($sAttCode);
 			}
 		}

+ 0 - 1
webservices/itoprest.examples.php

@@ -150,7 +150,6 @@ foreach ($aOperations as $iOp => $aOperation)
 
 	$response = DoPostRequest($sUrl, $aData);
 	$aResults = json_decode($response);
-	$aResults = $response;
 	if ($aResults)
 	{
 		echo "--------------------------------------\n";