# HG changeset patch # User Marcin Kuzminski # Date 2018-09-17 17:05:34 # Node ID de0f34deb91801ac63c74fd05829e38f612a6722 # Parent be94ff1978d6a462329158e3558b331878fbbb2a comments: fix extracing auth_user from the passed in objects. Before if auth_user is empty we could relly on INT or STR passed in diff --git a/rhodecode/model/comment.py b/rhodecode/model/comment.py --- a/rhodecode/model/comment.py +++ b/rhodecode/model/comment.py @@ -191,7 +191,6 @@ class CommentsModel(BaseModel): :param renderer: pick renderer for this comment """ - auth_user = auth_user or user if not text: log.warning('Missing text for comment, skipping...') return @@ -203,6 +202,7 @@ class CommentsModel(BaseModel): repo = self._get_repo(repo) user = self._get_user(user) + auth_user = auth_user or user schema = comment_schema.CommentSchema() validated_kwargs = schema.deserialize(dict(