Trying to return entity but Validation error gets raised #296
-
Hello 👋 I'm trying to return an entity which has two foreign keys associated to it. Any help or direction is appreciated! Thanks in advance.
I was able to create the city, as well as the associated timezone and country with no issue. However, when I try to get the city from the DB using a helper function, I get a validation error. API call
helper function
error message
Model for both Country and Timezone
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I ended up finding what the cause was. For some reason, even though a City model is returned, having it set in the response model was causing it to throw the Internal Server Error i shared above. The only change i had to make was this:
|
Beta Was this translation helpful? Give feedback.
I ended up finding what the cause was. For some reason, even though a City model is returned, having it set in the response model was causing it to throw the Internal Server Error i shared above.
The only change i had to make was this: