Переглянути джерело

#926 JSON/REST Delete: nasty report

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3200 a333f486-631f-4898-b8df-5754b55c2be0
romainq 11 роки тому
батько
коміт
c1be5128cb
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      core/dbobject.class.php

+ 2 - 1
core/dbobject.class.php

@@ -1885,7 +1885,8 @@ abstract class DBObject implements iDisplay
 			$this->AfterDelete();
 
 			$this->m_bIsInDB = false;
-			$this->m_iKey = null;
+			// Fix for #926: do NOT reset m_iKey as it can be used to have it for reporting purposes (see the REST service to delete objects, reported as bug #926)
+			// Thought the key is not reset, using DBInsert or DBWrite will create an object having the same characteristics and a new ID. DBUpdate is protected
 		}
 	}