waleedkadous / ansari-backend

Ansari is a helper for you to become a better Muslim
65 stars 12 forks source link

Ansari Agent's Message Logger Not Always Checked Before Logging #19

Closed abdullah-alnahas closed 3 months ago

abdullah-alnahas commented 4 months ago

The message_logger instance in agents/ansari.py can be initialized as None. It seems like there's an expectation that message_logger should be checked before use, but this check is missing in some places like: line 254 and Line 261.

If this isn't addressed, it might lead to AttributeError: 'NoneType' object has no attribute 'log' when a None value is passed as the message_logger.

abdullah-alnahas commented 3 months ago

The issue has been addressed in Pull Request #18. Closing.