31👍
✅
You have a closing parenthesis in the wrong place. The output_field
is an argument for Concat
, not for annotate
. It should be:
Project.objects.annotate(
companyname=Concat('company__name', Value('ahoj'), output_field=CharField()),
)
Source:stackexchange.com