diff options
Diffstat (limited to 'src/services/create_comment_service.py')
-rw-r--r-- | src/services/create_comment_service.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/services/create_comment_service.py b/src/services/create_comment_service.py index b995b25..97cf726 100644 --- a/src/services/create_comment_service.py +++ b/src/services/create_comment_service.py @@ -1,6 +1,7 @@ from sqlalchemy import select from src.database.models import Blog, Comment from src.database import db +from src.services.comment_creation_callbacks import CommentCreationCallbacks class CreateCommentService: @@ -26,6 +27,8 @@ class CreateCommentService: comment = Comment(blog_id=self._blog_id, content=self._content, email=self._email, author=self._author, post=self._post, language='en') + comment_callbacks = CommentCreationCallbacks(comment) + comment = comment_callbacks.run_callbacks() db.session.add(comment) db.session.commit() |