Open mikeckennedy opened 9 months ago
Hey Roman. :)
Describe the bug
If you have a large project and forget to include a model in the connection / registration, the error message is super weird.
To Reproduce Try to do a query without passing a document to the models value in the connection, for example:
await BackgroundJob.find(BackgroundJob.processing_status == JobStatus.awaiting).to_list()
if BackgroundJob wasn't registered, the error is:
BackgroundJob
AttributeError: processing_status
What? There is a processing_status on the class, but the class wasn't registered.
Expected behavior A message like "Cannot query against BackgroundJob, it has not been registered with Beanie"
Hi @mikeckennedy , Thank you for the catch! I'll pick this up next week during the next bug-fixing session.
Thanks Roman. :)
Hey Roman. :)
Describe the bug
If you have a large project and forget to include a model in the connection / registration, the error message is super weird.
To Reproduce Try to do a query without passing a document to the models value in the connection, for example:
if
BackgroundJob
wasn't registered, the error is:AttributeError: processing_status
What? There is a processing_status on the class, but the class wasn't registered.
Expected behavior A message like "Cannot query against BackgroundJob, it has not been registered with Beanie"