def _update_data(entity_id, public_key, sso_url, expires_at):
 data_obj = SAMLProviderData.current(entity_id)
 fetched_at = datetime.datetime.now()
 if (data_obj and ((data_obj.public_key == public_key) and (data_obj.sso_url == sso_url))):
  data_obj.expires_at = expires_at
  data_obj.fetched_at = fetched_at
  data_obj.save()
  return False
 else:
  SAMLProviderData.objects.create(entity_id=entity_id, fetched_at=fetched_at, expires_at=expires_at, sso_url=sso_url, public_key=public_key)
  return True

def _update_data ( entity_id , public_key , sso_url , expires_at ) : data_obj = SAMLProviderData . current ( entity_id ) fetched_at = datetime . datetime . now ( ) if ( data_obj and ( ( data_obj . public_key == public_key ) and ( data_obj . sso_url == sso_url ) ) ) : data_obj . expires_at = expires_at data_obj . fetched_at = fetched_at data_obj . save ( ) return False else : SAMLProviderData . objects . create ( entity_id = entity_id , fetched_at = fetched_at , expires_at = expires_at , sso_url = sso_url , public_key = public_key ) return True
prepare the data on horizontal shift of the viewport .