title: 'dict' object has no attribute 'id'
body: <p>This is my code. I'm trying to translate xml string into python list to be shown in html template.</p>
  <pre><code>self.task_xml = &quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
      &lt;django-objects version=&quot;1.0&quot;&gt;
  &lt;object model=&quot;task.task&quot; pk=&quot;31&quot;&gt;
  &lt;field name=&quot;name&quot; type=&quot;CharField&quot;&gt;New Task&lt;/field&gt;
  &lt;field name=&quot;parent_task_id&quot; type=&quot;IntegerField&quot;&gt;0&lt;/field&gt;
  &lt;/object&gt;
  &lt;object model=&quot;task.task&quot; pk=&quot;32&quot;&gt;
  &lt;field name=&quot;name&quot; type=&quot;CharField&quot;&gt;New Task&lt;/field&gt;
  &lt;field name=&quot;parent_task_id&quot; type=&quot;IntegerField&quot;&gt;0&lt;/field&gt;
  &lt;/object&gt;
  &lt;object model=&quot;task.task&quot; pk=&quot;33&quot;&gt;
  &lt;field name=&quot;name&quot; type=&quot;CharField&quot;&gt;New Task&lt;/field&gt;
  &lt;field name=&quot;parent_task_id&quot; type=&quot;IntegerField&quot;&gt;31&lt;/field&gt;
  &lt;/object&gt;
  &lt;object model=&quot;task.task&quot; pk=&quot;34&quot;&gt;
  &lt;field name=&quot;name&quot; type=&quot;CharField&quot;&gt;New Task&lt;/field&gt;
  &lt;field name=&quot;parent_task_id&quot; type=&quot;IntegerField&quot;&gt;31&lt;/field&gt;
  &lt;/object&gt;
  &lt;/django-objects&gt;&quot;
  
   58         self.xmlData = ET.fromstring(self.db.task_xml)
   59 
   60         self.task_list = []
   61         taskList = []                                                           
   62         for obj in self.xmlData.iter(&quot;object&quot;):
   63             parent_task_id = obj.find(&quot;field[@name='parent_task_id']&quot;).text
   64             if parent_task_id == EMPTY_UUID:
   65                 taskList.append({'id': obj.get(&quot;pk&quot;),
   66                     'name': obj.find(&quot;field[@name='name']&quot;).text,
   67                     'parent_task_id': parent_task_id ,
   68                     })
   69         # Apprend taskList:
   70         for task in taskList:
   71             taskViewModel = TaskViewModel(task.id, True)
   72             self.task_list.append(taskViewModel)
  </code></pre>
  <p>But I'm getting the error:</p>
  <pre><code>'dict' object has no attribute 'id'
  </code></pre>
  <p>And it is task.id in line 71</p>
  <p>Do you think I have a problem with this in line 65:</p>
  <pre><code>'id': obj.get(&quot;pk&quot;)
  </code></pre>