def action(self):
     self.notify_checklist_incomplete = 'Ran'
     logging.debug(self.last_actor)
     hook = Webhook.get(model_id=self.card_data['idBoard'])
     card = TrelloCard.get(idCard=self.card_data['id'])
     logging.debug(hook.user)
     unarchived = unarchive_card(self.card_data['id'], hook.user)
     if unarchived == True:
         if len(self.card_data['idMembers']) == 0:
             trello_user = TrelloUserInfo.get(trello_id=card.idMemberCreator)
             send_email('*****@*****.**', """
                 Hello, A card has been archived that has an incomplete checklist. It has
                 been unarchived. Please take a moment to look into this matter. %s Thanks!
                 The Nebri Support Team This email should have been sent to %s.
             """ % (self.card_data['shortUrl'], trello_user.username), "An Incomplete Card has been Archived")
         else:
             for member in self.card_data['idMembers']:
                 trello_user = TrelloUserInfo.get(trello_id=member)
                 send_email('*****@*****.**', """
                 Hello, A card has been archived that has an incomplete checklist. It has
                 been unarchived. Please take a moment to look into this matter. %s Thanks!
                 The Nebri Support Team This email should have been sent to %s.
                 """ % (self.card_data['shortUrl'], trello_user.username), "An Incomplete Card has been Archived")
     else:
         send_email('*****@*****.**', """
         An error occurred... %s
         """ % unarchived, "An Error Occurred during Archiving")
    def action(self):
        self.handle_unapproved_archived = 'Ran'
        hook = Webhook.get(model_id=self.card_data['idBoard'])
        try:
            card = TrelloCard.get(idCard=self.card_data['id'], user=self.default_user)
        except Process.DoesNotExist:
            return

        unarchived = unarchive_card(self.card_data['id'], hook.user)
        if unarchived == True:
            trello_user = TrelloUserInfo.get(trello_id=card.idMemberCreator)
            send_email('*****@*****.**', """
            Hello, A card has been archived which was not approved by a board admin. It has
            been unarchived. Please take a moment to look into this matter. %s Thanks!
            The Nebri Support Team  Team This email should have been sent to %s.
            """ % (self.card_data['shortUrl'], trello_user.username), "An Unapproved Card has been Archived")
        else:
            send_email('*****@*****.**', """
            An error occurred... %s
            """ % unarchived, "An Error Occurred during Archiving")