Unexpected non-iterable value for to-many relation bug introduced in v2.5.2 or v2.5.3 #5162
Unanswered
tristanbes
asked this question in
Q&A
Replies: 3 comments
-
Please check #3278 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@tristanbes The problem is here: "sectors": null
|
Beta Was this translation helpful? Give feedback.
0 replies
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
API Platform version(s) affected: in version v2.5.2 or v2.5.3 (coulnd't test 2.5.2 as it generated error 500 for the given request)
Description
When I try to get a collection of users, in v2.5.1, it's working well
Response:
How to reproduce
Upgrade to v2.5.3 (the v2.5.2 gave me error 500 when running this request)
Response:
Unexpected non-iterable value for to-many relation
Additional Context
As I understand from the trace, ApiPlatform tries to call
getSectors()
from theUser::class
. This is a problem, because this method only exists insideTechproCommercial::class
andTechproAgent:class
.I checked that no reference of
sectors
inside theUser::class
is found, so I don't understand why this is happening.Our user class has 2 inherited sub Users
Beta Was this translation helpful? Give feedback.
All reactions