riverfr0zen / graphene-mongo-extras

Provides some additional functionality on top of graphene-mongo
MIT License
13 stars 0 forks source link

AttributeError: type object 'MongoengineConnectionField' has no attribute 'name' OR AttributeError: type object 'NoneType' has no attribute 'name' #1

Closed anilwarbhe closed 5 years ago

anilwarbhe commented 5 years ago

If I have a info of "Highscore" info=ListField(EmbeddedDocumentField(PlaythruInfo)) insted of info = EmbeddedDocumentField(PlaythruInfo) it thows "AttributeError: type object 'NoneType' has no attribute 'name'" class HighScore(Document): player = StringField() score = IntField() recorded = DateTimeField() info = EmbeddedDocumentField(PlaythruInfo)

use info=ListField(EmbeddedDocumentField(PlaythruInfo))

and it will throw an error. Please help.

riverfr0zen commented 5 years ago

Hi Anil,

It's a deficiency in convert_for_lookup in filtering.utils. Since the software is still in an alpha state, there will probably be some uncovered cases like this.

Thanks for the bug report -- I will look into it, but it may be a week or so as I have some pressing deadlines. You are welcome to submit a PR if you want to take a stab.

riverfr0zen commented 5 years ago

This issue should be fixed in the latest commit. Leaving this open for a while for comments/questions. @anilwarbhe