'Update or create remote organization from Bitbucket API response
:param fields: dictionary response of data from API
:rtype: RemoteOrganization'

def create_organization(self, fields):

    (organization, _) = RemoteOrganization.objects.get_or_create(slug=fields.get('username'), account=self.account)
    organization.name = fields.get('display_name')
    organization.email = fields.get('email')
    organization.avatar_url = fields['links']['avatar']['href']
    organization.url = fields['links']['html']['href']
    organization.json = json.dumps(fields)
    organization.account = self.account
    organization.users.add(self.user)
    organization.save()
    return organization
