##// END OF EJS Templates
pull-requests: when creating a new version set the created_date to now instead of...
marcink -
r1191:31ff29e4 default
parent child Browse files
Show More
@@ -130,7 +130,8 b' class PullRequestModel(BaseModel):'
130 130 }
131 131
132 132 def __get_pull_request(self, pull_request):
133 return self._get_instance(PullRequest, pull_request)
133 return self._get_instance((
134 PullRequest, PullRequestVersion), pull_request)
134 135
135 136 def _check_perms(self, perms, pull_request, user, api=False):
136 137 if not api:
@@ -705,7 +706,7 b' class PullRequestModel(BaseModel):'
705 706 version.title = pull_request.title
706 707 version.description = pull_request.description
707 708 version.status = pull_request.status
708 version.created_on = pull_request.created_on
709 version.created_on = datetime.datetime.now()
709 710 version.updated_on = pull_request.updated_on
710 711 version.user_id = pull_request.user_id
711 712 version.source_repo = pull_request.source_repo
@@ -764,7 +764,10 b' def test_create_version_from_snapshot_up'
764 764 assert version.title == pr_util.create_parameters['title']
765 765 assert version.description == pr_util.create_parameters['description']
766 766 assert version.status == PullRequest.STATUS_CLOSED
767 assert version.created_on == created_on
767
768 # versions get updated created_on
769 assert version.created_on != created_on
770
768 771 assert version.updated_on == updated_on
769 772 assert version.user_id == pull_request.user_id
770 773 assert version.revisions == pr_util.create_parameters['revisions']
General Comments 0
You need to be logged in to leave comments. Login now