code: def update_or_create(cls, org, provider, exists):
          
          instance, created = cls.objects.update_or_create(
              org=org,
              provider=provider,
              defaults={'exists': exists},
          )
  
          return instance, created
docs: Update or create credentials state.