You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "F:\Developement\Django\recipes\cookbook\models.py", line 596, in reset_inheritance
Through = Food.objects.filter(tree_filter).first().inherit_fields.through
AttributeError: 'NoneType' object has no attribute 'inherit_fields'
The text was updated successfully, but these errors were encountered:
Just trying to find some low hanging fruit to wet my feet, so correct me if I am wrong.
Could this be caused by a space having no foods and hence the list returned by filter containing nothing, so first returns none. In that case is there food objects to reset at all? Couldn't the function just be a big null op at that point? Though at that point how/why was the function called?
Do you remember any of the context of this crash?
If this isn't a bug you want help with, is there some stuff you could use help with?
if you want feel free to give it a crack, i am sure that it isn't to hard i just did not have time to read/understand the 10 or so lines of code in that function. Your theory could be correct so reproducing should be easy, thanks for the feedback.
Food reset inheritance function is broken
The text was updated successfully, but these errors were encountered: