[Fixed]-I get an error when return a queryset objects: Cannot resolve expression type, unknown output_field

25👍

You might need to add an output_field to your annotation:

queryset = get_cinema.annotate(distance=models.Max(distation, output_field=models.FloatField()))

Leave a comment