We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b14edef commit 4194627Copy full SHA for 4194627
jolpica_api/ergastapi/serializers.py
@@ -44,8 +44,8 @@ class CircuitSerializer(ErgastModelSerializer):
44
45
def get_location(self, circuit: Circuit) -> dict:
46
return {
47
- "lat": str(circuit.location.y) if circuit.location else None,
48
- "long": str(circuit.location.x) if circuit.location else None,
+ "lat": f"{circuit.location.y:.05f}" if circuit.location else None,
+ "long": f"{circuit.location.x:.05f}" if circuit.location else None,
49
"locality": circuit.locality,
50
"country": circuit.country,
51
}
0 commit comments