website/docs: update geoip and asn example to use the proper syntax (#10249)
This commit is contained in:

committed by
GitHub

parent
d575eb8dcc
commit
7cadcbfa06
@ -56,13 +56,13 @@ import Objects from "../expressions/_objects.md";
|
||||
- `geoip`: GeoIP object, see [GeoIP](https://geoip2.readthedocs.io/en/latest/#geoip2.models.City)
|
||||
|
||||
```python
|
||||
return context["geoip"].country.iso_code == "US"
|
||||
return context["geoip"]["country"]["iso_code"] == "US"
|
||||
```
|
||||
|
||||
- `asn`: ASN object, see [GeoIP](https://geoip2.readthedocs.io/en/latest/#geoip2.models.ASN)
|
||||
|
||||
```python
|
||||
return context["asn"].autonomous_system_number == 64496
|
||||
return context["asn"]["autonomous_system_number"] == 64496
|
||||
```
|
||||
|
||||
- `ak_is_sso_flow`: Boolean which is true if request was initiated by authenticating through an external provider.
|
||||
|
Reference in New Issue
Block a user