2.1.2
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.1.2] - 2026-03-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Prevented AttributeError in modqueue watcher by checking for the 'title' attribute before accessing it. This ensures safe handling of Comment objects that do not have a 'title'.
|
||||||
|
|
||||||
## [2.1.1] - 2026-03-10
|
## [2.1.1] - 2026-03-10
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -293,7 +293,11 @@ class ModReplyBot:
|
|||||||
flair = (submission.link_flair_text or '').strip().lower()
|
flair = (submission.link_flair_text or '').strip().lower()
|
||||||
else:
|
else:
|
||||||
flair = ''
|
flair = ''
|
||||||
|
# Only access title if it's a Submission
|
||||||
|
if hasattr(submission, 'title'):
|
||||||
title = submission.title.strip()
|
title = submission.title.strip()
|
||||||
|
else:
|
||||||
|
title = ''
|
||||||
import re
|
import re
|
||||||
title_tags = re.findall(r'\[(.*?)\]', title)
|
title_tags = re.findall(r'\[(.*?)\]', title)
|
||||||
title_tags_lower = [t.strip().lower() for t in title_tags]
|
title_tags_lower = [t.strip().lower() for t in title_tags]
|
||||||
|
|||||||
Reference in New Issue
Block a user