Diff comments:

> 
> === modified file 'lib/lp/code/model/gitrepository.py'
> --- lib/lp/code/model/gitrepository.py        2018-10-03 00:53:55 +0000
> +++ lib/lp/code/model/gitrepository.py        2018-10-03 00:53:56 +0000
> @@ -1185,6 +1192,12 @@
>          return Store.of(self).find(
>              GitRuleGrant, GitRuleGrant.repository_id == self.id)
>  
> +    def getActivity(self):
> +        """See `IGitRepository`."""
> +        clauses = [GitActivity.repository_id == self.id]
> +        return Store.of(self).find(GitActivity, *clauses).order_by(
> +            Desc(GitActivity.date_changed), Desc(GitActivity.id))

I had it that way at first, but the following git-permissions-notifications 
branch needs to filter activity by "changed after this timestamp", and it was 
easier to make this a method so that I could add kwargs to it.

> +
>      def canBeDeleted(self):
>          """See `IGitRepository`."""
>          # Can't delete if the repository is associated with anything.


-- 
https://code.launchpad.net/~cjwatson/launchpad/git-activity-model/+merge/354399
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to