-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple NoMethod error on serializers #46
Comments
Hi @Kadaaran ! Thanks for the bug report, I never encountered this error in my production environment. Which version of panko are you using? are you running on a threaded environment (puma? sidekiq?)? |
Hi @yosiat ! I tried in development and it happens in dev as well 🤔 The method: cache_key = "sessions-index-#{(@template || @group).cache_key}-#{@sessions.cache_key}"
sessions_json = Rails.cache.fetch(cache_key, expires_in: 2.days) do
Panko::ArraySerializer.new(@sessions.order(start_time: :asc), each_serializer: SessionSerializer).to_json
end Thanks ! |
@Kadaaran I can't reproduce this locally. Can you please try and upgrade to latest panko version and see if it fixes the issue for you? |
@Kadaaran any update on reproduction? |
Hey @yosiat ! |
Hi @Kadaaran ! Thanks for trying to reproduce it! |
Hi there 👋
First of all I've been using Panko for a while and it's really great !
What happened ?
I've been encounting some weird errors recently. It seems
Panko
can't find my main object and its attributes. Even if the main object exists and is valid.Context
This is my serializer method 👇
I get from time to time
NoMethodError: undefined method
template' for nil:NilClass` which is weird because if I reload or do something it disappears. It's not triggering every time.Plus, when I go into my console I can find my
template
, thecolour
association andthe hex_code
without any problem.It feels like Panko can't get the main object fast enough to render it.
Did you have any king of errors like mine and do you have any idea how to fix it ?
Thanks ! 🤚
The text was updated successfully, but these errors were encountered: