title: Tastypie error while updating - field has was given data that was not a URI, not a dictionary-alike and does not have a 'pk' attribute
body: <p>I keep getting this error when i try to update my resource.</p>
  
  <p>The resource I am trying to update is called Message.
  It has a foreign key to account:</p>
  
  <pre><code>class AccountResource(ModelResource):
      class Meta:
          queryset = Account.objects.filter()
          resource_name = 'account'
          '''
          set to put because for some weird reason I can't edit 
          the other resources with patch if put is not allowed.
          '''
          allowed_methods = ['put']
          fields = ['id']
  
  
      def dehydrate(self, bundle):
          bundle.data['firstname'] = bundle.obj.account.first_name   
          bundle.data['lastname'] = bundle.obj.account.last_name
          return bundle
  </code></pre>
  
  <p><code>
  </code></p>
  
  <pre><code>class MessageResource(ModelResource):
      account = fields.ForeignKey(AccountResource, 'account', full=True)
  
      class Meta:
          queryset = AccountMessage.objects.filter(isActive=True)
          resource_name = 'message'
          allowed = ['get', 'put', 'patch', 'post']
          authentication = MessageAuthentication()
          authorization = MessageAuthorization()   
          filtering = {
                       'account' : ALL_WITH_RELATIONS
                       }
  </code></pre>
  
  <p>Now when i try to update my Message using a PATCH, I get this error:</p>
  
  <p><strong>Data passed in</strong>: <code>{"text":"blah!"}</code></p>
  
  <p><code>The 'account' field has was given data that was not a URI, not a dictionary-alike and does not have a 'pk' attribute: &lt;Bundle for obj: '&lt;2&gt; [nikunj]' and with data: '{'lastname': u'', 'id': u'2', 'firstname': u'', 'resource_uri': '/api/v1/account/2/'}'&gt;.</code></p>
  
  <p><strong>Bad Solution:</strong>:</p>
  
  <p>Pass in the data: <code>{"text":"blah!", "account":{"pk":2}}</code>
  I dont want to pass in the account. I just want to edit the text and nothing else. Why is there a need to pass in the account too?</p>
  
  <p>I tried to use:    </p>
  
  <pre><code>def obj_update(self, bundle, request=None, **kwargs):
          return super(ChartResource, self).obj_update(bundle, request, account=Account.objects.get(account=request.user))
  </code></pre>
  
  <p><em>BUT it doesnt work!!</em> 
  <strong>HELP!</strong></p>