Re: Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-04 Thread Ryan Gartin
preference I think it is reasonable to request that if QuerySet.state_id returns a valid value then it should also be capable of being serialized as well. On Thursday, August 3, 2023 at 9:46:27 PM UTC-4 Curtis Maloney wrote: > Hi Mike, > > On Fri, 4 Aug 2023, at 06:03, Ryan Gartin wrote: &

Feature Request: Allow Serialize Foreign Keys as Ids

2023-08-03 Thread Ryan Gartin
I came across this issue calling the following and FK fields with _id are ignored: serialize('json', , fields=['title', 'state_id']). State is a ForeignKey on my queryset. I can perform fields=['title', 'state'] and I get serialization correctly of {'state': int}. However, if I specify fie