Commits

Marcin Kuzminski committed f3e039e

Added created_on column to changeset comments for proper ordering.

  • Participants
  • Parent commits 8e6cf84

Comments (0)

Files changed (2)

File rhodecode/model/comment.py

             q = q.filter(ChangesetComment.pull_request == pull_request)
         else:
             raise Exception('Please specify revision or pull_request')
+        q = q.order_by(ChangesetComment.created_on)
         return q.all()
 
     def get_inline_comments(self, repo_id, revision=None, pull_request=None):

File rhodecode/model/db.py

     f_path = Column('f_path', Unicode(1000), nullable=True)
     user_id = Column('user_id', Integer(), ForeignKey('users.user_id'), nullable=False)
     text = Column('text', Unicode(25000), nullable=False)
-    modified_at = Column('modified_at', DateTime(), nullable=False, default=datetime.datetime.now)
+    created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
+    modified_at = Column('modified_at', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
 
     author = relationship('User', lazy='joined')
     repo = relationship('Repository')