parameters: (self, bundle, request=None, **kwargs)
return_statement: return bundle
docstring: - Checks the permissions of user, and updates the document
          - Fires assignmend_done signals for assigned users
docstring_summary: - Checks the permissions of user, and updates the document
          - Fires assignmend_done signals for assigned users
docstring_tokens: - Checks the permissions of user and updates the document - Fires assignmend_done signals for assigned users
function: def obj_update(self, bundle, request=None, **kwargs):
          """
          - Checks the permissions of user, and updates the document
          - Fires assignmend_done signals for assigned users
          """
          document = self.obj_get(request=request, pk=kwargs.get("pk"))
  
          if not document.is_editable(user_id=request.user.id):
              raise ImmediateHttpResponse(response=http.HttpUnauthorized())
  
          bundle = super(DocumentResource, self).obj_update(
              bundle, request, **kwargs)
  
          updated_document = self.obj_get(request=request, pk=kwargs.get("pk"))
          if document.assignees != updated_document.assignees:
              original = map(operator.itemgetter("id"), document.assignees)
              updated = map(operator.itemgetter("id"), updated_document.assignees)
              for user_id in set(updated).difference(original):
                  assignment_done.send(
                      sender=self,
                      user_id=user_id,
                      instance=updated_document)
  
          return bundle
function_tokens: def obj_update ( self , bundle , request = None , * * kwargs ) : document = self . obj_get ( request = request , pk = kwargs . get ( "pk" ) ) if not document . is_editable ( user_id = request . user . id ) : raise ImmediateHttpResponse ( response = http . HttpUnauthorized ( ) ) bundle = super ( DocumentResource , self ) . obj_update ( bundle , request , * * kwargs ) updated_document = self . obj_get ( request = request , pk = kwargs . get ( "pk" ) ) if document . assignees != updated_document . assignees : original = map ( operator . itemgetter ( "id" ) , document . assignees ) updated = map ( operator . itemgetter ( "id" ) , updated_document . assignees ) for user_id in set ( updated ) . difference ( original ) : assignment_done . send ( sender = self , user_id = user_id , instance = updated_document ) return bundle